Skip to content

Commit

Permalink
Merge branch 'master' into remove-cors-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Mar 3, 2020
2 parents 82a81c5 + 02f89f0 commit 7d21a7a
Show file tree
Hide file tree
Showing 345 changed files with 12,347 additions and 4,391 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import { MyPluginDepsStart } from './plugin';

export renderApp = ({ element, history }: AppMountParameters) => {
ReactDOM.render(
// pass `appBasePath` to `basename`
<Router history={history}>
<Route path="/" exact component={HomePage} />
</Router>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ import { BrowserRouter, Route } from 'react-router-dom';
import { CoreStart, AppMountParams } from 'src/core/public';
import { MyPluginDepsStart } from './plugin';

export renderApp = ({ appBasePath, element, onAppLeave }: AppMountParams) => {
export renderApp = ({ element, history, onAppLeave }: AppMountParams) => {
const { renderApp, hasUnsavedChanges } = await import('./application');
onAppLeave(actions => {
if(hasUnsavedChanges()) {
return actions.confirm('Some changes were not saved. Are you sure you want to leave?');
}
return actions.default();
});
return renderApp(params);
return renderApp({ element, history });
}

```
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-server](./kibana-plugin-server.md) &gt; [DestructiveRouteMethod](./kibana-plugin-server.destructiveroutemethod.md)

## DestructiveRouteMethod type

Set of HTTP methods changing the state of the server.

<b>Signature:</b>

```typescript
export declare type DestructiveRouteMethod = 'post' | 'put' | 'delete' | 'patch';
```
7 changes: 7 additions & 0 deletions docs/development/core/server/kibana-plugin-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,16 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [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 |
| [MetricsServiceSetup](./kibana-plugin-server.metricsservicesetup.md) | APIs to retrieves metrics gathered and exposed by the core platform. |
| [OnPostAuthToolkit](./kibana-plugin-server.onpostauthtoolkit.md) | A tool set defining an outcome of OnPostAuth interceptor for incoming request. |
| [OnPreAuthToolkit](./kibana-plugin-server.onpreauthtoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
| [OnPreResponseExtensions](./kibana-plugin-server.onpreresponseextensions.md) | Additional data to extend a response. |
| [OnPreResponseInfo](./kibana-plugin-server.onpreresponseinfo.md) | Response status code. |
| [OnPreResponseToolkit](./kibana-plugin-server.onpreresponsetoolkit.md) | A tool set defining an outcome of OnPreAuth interceptor for incoming request. |
| [OpsMetrics](./kibana-plugin-server.opsmetrics.md) | Regroups metrics gathered by all the collectors. This contains metrics about the os/runtime, the kibana process and the http server. |
| [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) | OS related metrics |
| [OpsProcessMetrics](./kibana-plugin-server.opsprocessmetrics.md) | Process related metrics |
| [OpsServerMetrics](./kibana-plugin-server.opsservermetrics.md) | server related metrics |
| [PackageInfo](./kibana-plugin-server.packageinfo.md) | |
| [Plugin](./kibana-plugin-server.plugin.md) | The interface that should be returned by a <code>PluginInitializer</code>. |
| [PluginConfigDescriptor](./kibana-plugin-server.pluginconfigdescriptor.md) | Describes a plugin configuration properties. |
Expand Down Expand Up @@ -183,6 +188,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [ConfigDeprecationLogger](./kibana-plugin-server.configdeprecationlogger.md) | Logger interface used when invoking a [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md) |
| [ConfigDeprecationProvider](./kibana-plugin-server.configdeprecationprovider.md) | A provider that should returns a list of [ConfigDeprecation](./kibana-plugin-server.configdeprecation.md)<!-- -->.<!-- -->See [ConfigDeprecationFactory](./kibana-plugin-server.configdeprecationfactory.md) for more usage examples. |
| [ConfigPath](./kibana-plugin-server.configpath.md) | |
| [DestructiveRouteMethod](./kibana-plugin-server.destructiveroutemethod.md) | Set of HTTP methods changing the state of the server. |
| [ElasticsearchClientConfig](./kibana-plugin-server.elasticsearchclientconfig.md) | |
| [GetAuthHeaders](./kibana-plugin-server.getauthheaders.md) | Get headers to authenticate a user against Elasticsearch. |
| [GetAuthState](./kibana-plugin-server.getauthstate.md) | Gets authentication state for a request. Returned by <code>auth</code> interceptor. |
Expand Down Expand Up @@ -227,6 +233,7 @@ The plugin integrates with the core system via lifecycle events: `setup`<!-- -->
| [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) | The custom validation function if @<!-- -->kbn/config-schema is not a valid solution for your specific plugin requirements. |
| [RouteValidationSpec](./kibana-plugin-server.routevalidationspec.md) | Allowed property validation options: either @<!-- -->kbn/config-schema validations or custom validation functions<!-- -->See [RouteValidationFunction](./kibana-plugin-server.routevalidationfunction.md) for custom validation. |
| [RouteValidatorFullConfig](./kibana-plugin-server.routevalidatorfullconfig.md) | Route validations config and options merged into one object |
| [SafeRouteMethod](./kibana-plugin-server.saferoutemethod.md) | Set of HTTP methods not changing the state of the server. |
| [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) | Type definition for a Saved Object attribute value |
| [SavedObjectAttributeSingle](./kibana-plugin-server.savedobjectattributesingle.md) | Don't use this type, it's simply a helper type for [SavedObjectAttribute](./kibana-plugin-server.savedobjectattribute.md) |
| [SavedObjectMigrationFn](./kibana-plugin-server.savedobjectmigrationfn.md) | A migration function for a [saved object type](./kibana-plugin-server.savedobjectstype.md) used to migrate it to a given version |
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [MetricsServiceSetup](./kibana-plugin-server.metricsservicesetup.md) &gt; [getOpsMetrics$](./kibana-plugin-server.metricsservicesetup.getopsmetrics_.md)

## MetricsServiceSetup.getOpsMetrics$ property

Retrieve an observable emitting the [OpsMetrics](./kibana-plugin-server.opsmetrics.md) gathered. The observable will emit an initial value during core's `start` phase, and a new value every fixed interval of time, based on the `opts.interval` configuration property.

<b>Signature:</b>

```typescript
getOpsMetrics$: () => Observable<OpsMetrics>;
```

## Example


```ts
core.metrics.getOpsMetrics$().subscribe(metrics => {
// do something with the metrics
})

```

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) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [MetricsServiceSetup](./kibana-plugin-server.metricsservicesetup.md)

## MetricsServiceSetup interface

APIs to retrieves metrics gathered and exposed by the core platform.

<b>Signature:</b>

```typescript
export interface MetricsServiceSetup
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [getOpsMetrics$](./kibana-plugin-server.metricsservicesetup.getopsmetrics_.md) | <code>() =&gt; Observable&lt;OpsMetrics&gt;</code> | Retrieve an observable emitting the [OpsMetrics](./kibana-plugin-server.opsmetrics.md) gathered. The observable will emit an initial value during core's <code>start</code> phase, and a new value every fixed interval of time, based on the <code>opts.interval</code> configuration property. |

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-server](./kibana-plugin-server.md) &gt; [OpsMetrics](./kibana-plugin-server.opsmetrics.md) &gt; [concurrent\_connections](./kibana-plugin-server.opsmetrics.concurrent_connections.md)

## OpsMetrics.concurrent\_connections property

number of current concurrent connections to the server

<b>Signature:</b>

```typescript
concurrent_connections: OpsServerMetrics['concurrent_connections'];
```
24 changes: 24 additions & 0 deletions docs/development/core/server/kibana-plugin-server.opsmetrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OpsMetrics](./kibana-plugin-server.opsmetrics.md)

## OpsMetrics interface

Regroups metrics gathered by all the collectors. This contains metrics about the os/runtime, the kibana process and the http server.

<b>Signature:</b>

```typescript
export interface OpsMetrics
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [concurrent\_connections](./kibana-plugin-server.opsmetrics.concurrent_connections.md) | <code>OpsServerMetrics['concurrent_connections']</code> | number of current concurrent connections to the server |
| [os](./kibana-plugin-server.opsmetrics.os.md) | <code>OpsOsMetrics</code> | OS related metrics |
| [process](./kibana-plugin-server.opsmetrics.process.md) | <code>OpsProcessMetrics</code> | Process related metrics |
| [requests](./kibana-plugin-server.opsmetrics.requests.md) | <code>OpsServerMetrics['requests']</code> | server requests stats |
| [response\_times](./kibana-plugin-server.opsmetrics.response_times.md) | <code>OpsServerMetrics['response_times']</code> | server response time stats |

13 changes: 13 additions & 0 deletions docs/development/core/server/kibana-plugin-server.opsmetrics.os.md
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-server](./kibana-plugin-server.md) &gt; [OpsMetrics](./kibana-plugin-server.opsmetrics.md) &gt; [os](./kibana-plugin-server.opsmetrics.os.md)

## OpsMetrics.os property

OS related metrics

<b>Signature:</b>

```typescript
os: OpsOsMetrics;
```
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-server](./kibana-plugin-server.md) &gt; [OpsMetrics](./kibana-plugin-server.opsmetrics.md) &gt; [process](./kibana-plugin-server.opsmetrics.process.md)

## OpsMetrics.process property

Process related metrics

<b>Signature:</b>

```typescript
process: OpsProcessMetrics;
```
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-server](./kibana-plugin-server.md) &gt; [OpsMetrics](./kibana-plugin-server.opsmetrics.md) &gt; [requests](./kibana-plugin-server.opsmetrics.requests.md)

## OpsMetrics.requests property

server requests stats

<b>Signature:</b>

```typescript
requests: OpsServerMetrics['requests'];
```
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-server](./kibana-plugin-server.md) &gt; [OpsMetrics](./kibana-plugin-server.opsmetrics.md) &gt; [response\_times](./kibana-plugin-server.opsmetrics.response_times.md)

## OpsMetrics.response\_times property

server response time stats

<b>Signature:</b>

```typescript
response_times: OpsServerMetrics['response_times'];
```
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-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) &gt; [distro](./kibana-plugin-server.opsosmetrics.distro.md)

## OpsOsMetrics.distro property

The os distrib. Only present for linux platforms

<b>Signature:</b>

```typescript
distro?: string;
```
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-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) &gt; [distroRelease](./kibana-plugin-server.opsosmetrics.distrorelease.md)

## OpsOsMetrics.distroRelease property

The os distrib release, prefixed by the os distrib. Only present for linux platforms

<b>Signature:</b>

```typescript
distroRelease?: string;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) &gt; [load](./kibana-plugin-server.opsosmetrics.load.md)

## OpsOsMetrics.load property

cpu load metrics

<b>Signature:</b>

```typescript
load: {
'1m': number;
'5m': number;
'15m': number;
};
```
26 changes: 26 additions & 0 deletions docs/development/core/server/kibana-plugin-server.opsosmetrics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md)

## OpsOsMetrics interface

OS related metrics

<b>Signature:</b>

```typescript
export interface OpsOsMetrics
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [distro](./kibana-plugin-server.opsosmetrics.distro.md) | <code>string</code> | The os distrib. Only present for linux platforms |
| [distroRelease](./kibana-plugin-server.opsosmetrics.distrorelease.md) | <code>string</code> | The os distrib release, prefixed by the os distrib. Only present for linux platforms |
| [load](./kibana-plugin-server.opsosmetrics.load.md) | <code>{</code><br/><code> '1m': number;</code><br/><code> '5m': number;</code><br/><code> '15m': number;</code><br/><code> }</code> | cpu load metrics |
| [memory](./kibana-plugin-server.opsosmetrics.memory.md) | <code>{</code><br/><code> total_in_bytes: number;</code><br/><code> free_in_bytes: number;</code><br/><code> used_in_bytes: number;</code><br/><code> }</code> | system memory usage metrics |
| [platform](./kibana-plugin-server.opsosmetrics.platform.md) | <code>NodeJS.Platform</code> | The os platform |
| [platformRelease](./kibana-plugin-server.opsosmetrics.platformrelease.md) | <code>string</code> | The os platform release, prefixed by the platform name |
| [uptime\_in\_millis](./kibana-plugin-server.opsosmetrics.uptime_in_millis.md) | <code>number</code> | the OS uptime |

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

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) &gt; [memory](./kibana-plugin-server.opsosmetrics.memory.md)

## OpsOsMetrics.memory property

system memory usage metrics

<b>Signature:</b>

```typescript
memory: {
total_in_bytes: number;
free_in_bytes: number;
used_in_bytes: number;
};
```
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-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) &gt; [platform](./kibana-plugin-server.opsosmetrics.platform.md)

## OpsOsMetrics.platform property

The os platform

<b>Signature:</b>

```typescript
platform: NodeJS.Platform;
```
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-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) &gt; [platformRelease](./kibana-plugin-server.opsosmetrics.platformrelease.md)

## OpsOsMetrics.platformRelease property

The os platform release, prefixed by the platform name

<b>Signature:</b>

```typescript
platformRelease: string;
```
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-server](./kibana-plugin-server.md) &gt; [OpsOsMetrics](./kibana-plugin-server.opsosmetrics.md) &gt; [uptime\_in\_millis](./kibana-plugin-server.opsosmetrics.uptime_in_millis.md)

## OpsOsMetrics.uptime\_in\_millis property

the OS uptime

<b>Signature:</b>

```typescript
uptime_in_millis: number;
```
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-server](./kibana-plugin-server.md) &gt; [OpsProcessMetrics](./kibana-plugin-server.opsprocessmetrics.md) &gt; [event\_loop\_delay](./kibana-plugin-server.opsprocessmetrics.event_loop_delay.md)

## OpsProcessMetrics.event\_loop\_delay property

node event loop delay

<b>Signature:</b>

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

[Home](./index.md) &gt; [kibana-plugin-server](./kibana-plugin-server.md) &gt; [OpsProcessMetrics](./kibana-plugin-server.opsprocessmetrics.md)

## OpsProcessMetrics interface

Process related metrics

<b>Signature:</b>

```typescript
export interface OpsProcessMetrics
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [event\_loop\_delay](./kibana-plugin-server.opsprocessmetrics.event_loop_delay.md) | <code>number</code> | node event loop delay |
| [memory](./kibana-plugin-server.opsprocessmetrics.memory.md) | <code>{</code><br/><code> heap: {</code><br/><code> total_in_bytes: number;</code><br/><code> used_in_bytes: number;</code><br/><code> size_limit: number;</code><br/><code> };</code><br/><code> resident_set_size_in_bytes: number;</code><br/><code> }</code> | process memory usage |
| [pid](./kibana-plugin-server.opsprocessmetrics.pid.md) | <code>number</code> | pid of the kibana process |
| [uptime\_in\_millis](./kibana-plugin-server.opsprocessmetrics.uptime_in_millis.md) | <code>number</code> | uptime of the kibana process |

Loading

0 comments on commit 7d21a7a

Please sign in to comment.