Docs: run the api-extractor on master to update docs (#23726)
* regenerated packages docs. * fixed spelling issues. * fixed spelling issues.
This commit is contained in:
@@ -16,63 +16,65 @@ A library containing services, configurations etc. used to interact with the Gra
|
||||
|
||||
| Class | Description |
|
||||
| --- | --- |
|
||||
| [DataSourceWithBackend](./datasourcewithbackend/) | |
|
||||
| [DataSourceWithBackend](./datasourcewithbackend/) | Extend this class to implement a data source plugin that is depending on the Grafana backend API. |
|
||||
| [GrafanaBootConfig](./grafanabootconfig/) | |
|
||||
|
||||
## Enumerations
|
||||
|
||||
| Enumeration | Description |
|
||||
| --- | --- |
|
||||
| [EchoEventType](./echoeventtype/) | |
|
||||
| [EchoEventType](./echoeventtype/) | Supported echo event types that can be sent via the [EchoSrv](./runtime/echosrv.md)<!-- -->. |
|
||||
| [HealthStatus](./healthstatus/) | Describes the current healt status of a data source plugin. |
|
||||
| [MetaAnalyticsEventName](./metaanalyticseventname/) | The meta analytics events that can be added to the echo service. |
|
||||
|
||||
## Functions
|
||||
|
||||
| Function | Description |
|
||||
| --- | --- |
|
||||
| [getAngularLoader()](./getangularloader/) | |
|
||||
| [getDataSourceSrv()](./getdatasourcesrv/) | |
|
||||
| [getEchoSrv()](./getechosrv/) | |
|
||||
| [getLocationSrv()](./getlocationsrv/) | |
|
||||
| [loadPluginCss(options)](./loadplugincss/) | |
|
||||
| [setAngularLoader(v)](./setangularloader/) | |
|
||||
| [setDataSourceSrv(instance)](./setdatasourcesrv/) | |
|
||||
| [setEchoSrv(instance)](./setechosrv/) | |
|
||||
| [setLocationSrv(instance)](./setlocationsrv/) | |
|
||||
| [getAngularLoader()](./getangularloader/) | Used to retrieve the [AngularLoader](./runtime/angularloader.md) that enables the use of Angular components within a React component.<!-- -->Please see the [AngularComponent](./runtime/angularcomponent.md) for a proper example. |
|
||||
| [getDataSourceSrv()](./getdatasourcesrv/) | Used to retrieve the [DataSourceSrv](./runtime/datasourcesrv.md) that is the entry point for communicating with a datasource that is added as a plugin (both external and internal). |
|
||||
| [getEchoSrv()](./getechosrv/) | Used to retrieve the [EchoSrv](./runtime/echosrv.md) that can be used to report events to registered echo backends. |
|
||||
| [getLocationSrv()](./getlocationsrv/) | Used to retrieve the [LocationSrv](./runtime/locationsrv.md) that can be used to automatically navigate the user to a new place in Grafana. |
|
||||
| [loadPluginCss(options)](./loadplugincss/) | Use this to load css for a Grafana plugin by specifying a [PluginCssOptions](./runtime/plugincssoptions.md) containing styling for the dark and the light theme. |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
| --- | --- |
|
||||
| [AngularComponent](./angularcomponent/) | |
|
||||
| [AngularLoader](./angularloader/) | |
|
||||
| [BackendSrv](./backendsrv/) | |
|
||||
| [BuildInfo](./buildinfo/) | |
|
||||
| [DataSourceSrv](./datasourcesrv/) | |
|
||||
| [EchoBackend](./echobackend/) | |
|
||||
| [EchoEvent](./echoevent/) | |
|
||||
| [EchoMeta](./echometa/) | |
|
||||
| [EchoSrv](./echosrv/) | |
|
||||
| [LocationSrv](./locationsrv/) | |
|
||||
| [AngularComponent](./angularcomponent/) | Used to enable rendering of Angular components within a React component without losing proper typings. |
|
||||
| [AngularLoader](./angularloader/) | Used to load an Angular component from the context of a React component. Please see the [AngularComponent](./runtime/angularcomponent.md) for a proper example. |
|
||||
| [BackendSrv](./backendsrv/) | Used to communicate via http(s) to a remote backend such as the Grafana backend, a datasource etc. The BackendSrv is using the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) under the hood to handle all the communication.<!-- -->The request function can be used to perform a remote call by specifying a [BackendSrvRequest](./runtime/backendsrvrequest.md)<!-- -->. To make the BackendSrv a bit easier to use we have added a couple of shorthand functions that will use default values executing the request. |
|
||||
| [DashboardInfo](./dashboardinfo/) | Describes the basic dashboard information that can be passed as the meta analytics payload. |
|
||||
| [DashboardViewEventPayload](./dashboardvieweventpayload/) | Describes the payload of a dashboard view event. |
|
||||
| [DataRequestEventPayload](./datarequesteventpayload/) | Describes the payload of a data request event. |
|
||||
| [DataRequestInfo](./datarequestinfo/) | Describes the data request information passed as the meta analytics payload. |
|
||||
| [DataSourceSrv](./datasourcesrv/) | This is the entry point for communicating with a datasource that is added as a plugin (both external and internal). Via this service you will get access to the [DataSourceApi](./data/datasourceapi.md) that have a rich API for communicating with the datasource. |
|
||||
| [EchoBackend](./echobackend/) | Describes echo backends that can be registered to receive of events. |
|
||||
| [EchoEvent](./echoevent/) | Describes an echo event. |
|
||||
| [EchoMeta](./echometa/) | Describes the meta information that are sent together with each event. |
|
||||
| [EchoSrv](./echosrv/) | Used to send events to all the registered backends. This should be accessed via the [getEchoSrv()](./runtime/getechosrv.md) function. Will, by default, flush events to the backends every 10s or when the flush function is triggered. |
|
||||
| [HealthCheckResult](./healthcheckresult/) | Describes the payload returned when checking the health of a data source plugin. |
|
||||
| [LocationSrv](./locationsrv/) | If you need to automatically navigate the user to a new place in the application this should be done via the LocationSrv and it will make sure to update the application state accordingly. |
|
||||
| [LocationUpdate](./locationupdate/) | |
|
||||
| [MetaAnalyticsEvent](./metaanalyticsevent/) | |
|
||||
| [MetaAnalyticsEventPayload](./metaanalyticseventpayload/) | |
|
||||
| [MetaAnalyticsEvent](./metaanalyticsevent/) | Describes meta analytics event with predefined [EchoEventType.MetaAnalytics](./runtime/echoeventtype/metaanalytics.md) type. |
|
||||
| [PluginCssOptions](./plugincssoptions/) | Option to specify a plugin css that should be applied for the dark and the light theme. |
|
||||
| [SizeMeta](./sizemeta/) | Describes a size with width/height |
|
||||
| [TemplateSrv](./templatesrv/) | Via the TemplateSrv consumers get access to all the available template variables that can be used within the current active dashboard.<!-- -->For a more in-depth description visit: https://grafana.com/docs/grafana/latest/reference/templating |
|
||||
|
||||
## Variables
|
||||
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| [config](./config/) | |
|
||||
| [getBackendSrv](./getbackendsrv/) | |
|
||||
| [registerEchoBackend](./registerechobackend/) | |
|
||||
| [reportMetaAnalytics](./reportmetaanalytics/) | |
|
||||
| [setBackendSrv](./setbackendsrv/) | |
|
||||
| [SystemJS](./systemjs/) | |
|
||||
| [config](./config/) | Use this to access the [GrafanaBootConfig](./runtime/grafanabootconfig.md) for the current running Grafana instance. |
|
||||
| [getBackendSrv](./getbackendsrv/) | Used to retrieve the [BackendSrv](./runtime/backendsrv.md) that can be used to communicate via http(s) to a remote backend such as the Grafana backend, a datasource etc. |
|
||||
| [getTemplateSrv](./gettemplatesrv/) | Used to retrieve the [TemplateSrv](./runtime/templatesrv.md) that can be used to fetch available template variables. |
|
||||
| [registerEchoBackend](./registerechobackend/) | Used to register echo backends that will receive Grafana echo events during application runtime. |
|
||||
| [reportMetaAnalytics](./reportmetaanalytics/) | Helper function to report meta analytics to the [EchoSrv](./runtime/echosrv.md)<!-- -->. |
|
||||
|
||||
## Type Aliases
|
||||
|
||||
| Type Alias | Description |
|
||||
| --- | --- |
|
||||
| [BackendSrvRequest](./backendsrvrequest/) | Currently implemented with: https://docs.angularjs.org/api/ng/service/$http\#usage but that will likely change in the future |
|
||||
| [UrlQueryMap](./urlquerymap/) | |
|
||||
| [UrlQueryValue](./urlqueryvalue/) | |
|
||||
| [BackendSrvRequest](./backendsrvrequest/) | Used to initiate a remote call via the [BackendSrv](./runtime/backendsrv.md) |
|
||||
| [MetaAnalyticsEventPayload](./metaanalyticseventpayload/) | Describes the meta analytics payload passed with the [MetaAnalyticsEvent](./runtime/metaanalyticsevent.md) |
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## AngularComponent interface
|
||||
|
||||
Used to enable rendering of Angular components within a React component without losing proper typings.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -20,16 +22,49 @@ export interface AngularComponent
|
||||
```typescript
|
||||
import { AngularComponent } from '@grafana/runtime';
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
```typescript
|
||||
class Component extends PureComponent<Props> {
|
||||
element: HTMLElement;
|
||||
angularComponent: AngularComponent;
|
||||
|
||||
componentDidMount() {
|
||||
const template = '<angular-component />' // angular template here;
|
||||
const scopeProps = { ctrl: angularController }; // angular scope properties here
|
||||
const loader = getAngularLoader();
|
||||
this.angularComponent = loader.load(this.element, scopeProps, template);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
if (this.angularComponent) {
|
||||
this.angularComponent.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div ref={element => (this.element = element)} />
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
<b>Methods</b>
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [destroy()](#destroy-method) | |
|
||||
| [digest()](#digest-method) | |
|
||||
| [getScope()](#getscope-method) | |
|
||||
| [destroy()](#destroy-method) | Should be called when the React component will unmount. |
|
||||
| [digest()](#digest-method) | Can be used to trigger a re-render of the Angular component. |
|
||||
| [getScope()](#getscope-method) | Used to access the Angular scope from the React component. |
|
||||
|
||||
### destroy method
|
||||
|
||||
Should be called when the React component will unmount.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -41,6 +76,8 @@ destroy(): void;
|
||||
|
||||
### digest method
|
||||
|
||||
Can be used to trigger a re-render of the Angular component.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -52,6 +89,8 @@ digest(): void;
|
||||
|
||||
### getScope method
|
||||
|
||||
Used to access the Angular scope from the React component.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## AngularLoader interface
|
||||
|
||||
Used to load an Angular component from the context of a React component. Please see the [AngularComponent](./runtime/angularcomponent.md) for a proper example.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -37,9 +39,9 @@ load(elem: any, scopeProps: any, template: string): AngularComponent;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| elem | <code>any</code> | |
|
||||
| scopeProps | <code>any</code> | |
|
||||
| template | <code>string</code> | |
|
||||
| elem | <code>any</code> | the element that the Angular component will be loaded into. |
|
||||
| scopeProps | <code>any</code> | values that will be accessed via the Angular scope. |
|
||||
| template | <code>string</code> | template used by the Angular component. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
||||
@@ -10,6 +10,10 @@ draft = true
|
||||
|
||||
## BackendSrv interface
|
||||
|
||||
Used to communicate via http(s) to a remote backend such as the Grafana backend, a datasource etc. The BackendSrv is using the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) under the hood to handle all the communication.
|
||||
|
||||
The request function can be used to perform a remote call by specifying a [BackendSrvRequest](./runtime/backendsrvrequest.md)<!-- -->. To make the BackendSrv a bit easier to use we have added a couple of shorthand functions that will use default values executing the request.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -20,11 +24,16 @@ export interface BackendSrv
|
||||
```typescript
|
||||
import { BackendSrv } from '@grafana/runtime';
|
||||
```
|
||||
|
||||
## Remarks
|
||||
|
||||
By default Grafana will display an error message alert if the remote call fails. If you want to prevent this from happending you need to catch the error thrown by the BackendSrv and set the `isHandled = true` on the incoming error.
|
||||
|
||||
<b>Methods</b>
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [datasourceRequest(options)](#datasourcerequest-method) | |
|
||||
| [datasourceRequest(options)](#datasourcerequest-method) | Special function used to communicate with datasources that will emit core events that the Grafana QueryInspector and QueryEditor is listening for to be able to display datasource query information. Can be skipped by adding <code>option.silent</code> when initializing the request. |
|
||||
| [delete(url)](#delete-method) | |
|
||||
| [get(url, params, requestId)](#get-method) | |
|
||||
| [patch(url, data)](#patch-method) | |
|
||||
@@ -34,6 +43,8 @@ import { BackendSrv } from '@grafana/runtime';
|
||||
|
||||
### datasourceRequest method
|
||||
|
||||
Special function used to communicate with datasources that will emit core events that the Grafana QueryInspector and QueryEditor is listening for to be able to display datasource query information. Can be skipped by adding `option.silent` when initializing the request.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,7 +12,7 @@ draft = true
|
||||
|
||||
### BackendSrvRequest type
|
||||
|
||||
Currently implemented with: https://docs.angularjs.org/api/ng/service/$http\#usage but that will likely change in the future
|
||||
Used to initiate a remote call via the [BackendSrv](./runtime/backendsrv.md)
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "BuildInfo"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## BuildInfo interface
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface BuildInfo
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { BuildInfo } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [commit](#commit-property) | <code>string</code> | |
|
||||
| [edition](#edition-property) | <code>string</code> | |
|
||||
| [env](#env-property) | <code>string</code> | |
|
||||
| [hasUpdate](#hasupdate-property) | <code>boolean</code> | |
|
||||
| [isEnterprise](#isenterprise-property) | <code>boolean</code> | |
|
||||
| [latestVersion](#latestversion-property) | <code>string</code> | |
|
||||
| [version](#version-property) | <code>string</code> | |
|
||||
|
||||
### commit property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
commit: string;
|
||||
```
|
||||
|
||||
### edition property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
edition: string;
|
||||
```
|
||||
|
||||
### env property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
env: string;
|
||||
```
|
||||
|
||||
### hasUpdate property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
hasUpdate: boolean;
|
||||
```
|
||||
|
||||
### isEnterprise property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
isEnterprise: boolean;
|
||||
```
|
||||
|
||||
### latestVersion property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
latestVersion: string;
|
||||
```
|
||||
|
||||
### version property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
version: string;
|
||||
```
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### config variable
|
||||
|
||||
Use this to access the [GrafanaBootConfig](./runtime/grafanabootconfig.md) for the current running Grafana instance.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "DashboardInfo"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## DashboardInfo interface
|
||||
|
||||
Describes the basic dashboard information that can be passed as the meta analytics payload.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface DashboardInfo
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { DashboardInfo } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [dashboardId](#dashboardid-property) | <code>number</code> | |
|
||||
| [dashboardName](#dashboardname-property) | <code>string</code> | |
|
||||
| [dashboardUid](#dashboarduid-property) | <code>string</code> | |
|
||||
| [folderName](#foldername-property) | <code>string</code> | |
|
||||
|
||||
### dashboardId property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dashboardId: number;
|
||||
```
|
||||
|
||||
### dashboardName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dashboardName: string;
|
||||
```
|
||||
|
||||
### dashboardUid property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dashboardUid: string;
|
||||
```
|
||||
|
||||
### folderName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
folderName?: string;
|
||||
```
|
||||
@@ -0,0 +1,37 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "DashboardViewEventPayload"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## DashboardViewEventPayload interface
|
||||
|
||||
Describes the payload of a dashboard view event.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface DashboardViewEventPayload extends DashboardInfo
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { DashboardViewEventPayload } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [eventName](#eventname-property) | <code>MetaAnalyticsEventName.DashboardView</code> | |
|
||||
|
||||
### eventName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
eventName: MetaAnalyticsEventName.DashboardView;
|
||||
```
|
||||
@@ -0,0 +1,37 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "DataRequestEventPayload"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## DataRequestEventPayload interface
|
||||
|
||||
Describes the payload of a data request event.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface DataRequestEventPayload extends DataRequestInfo
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { DataRequestEventPayload } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [eventName](#eventname-property) | <code>MetaAnalyticsEventName.DataRequest</code> | |
|
||||
|
||||
### eventName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
eventName: MetaAnalyticsEventName.DataRequest;
|
||||
```
|
||||
@@ -0,0 +1,91 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "DataRequestInfo"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## DataRequestInfo interface
|
||||
|
||||
Describes the data request information passed as the meta analytics payload.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface DataRequestInfo extends Partial<DashboardInfo>
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { DataRequestInfo } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [dataSize](#datasize-property) | <code>number</code> | |
|
||||
| [datasourceId](#datasourceid-property) | <code>number</code> | |
|
||||
| [datasourceName](#datasourcename-property) | <code>string</code> | |
|
||||
| [duration](#duration-property) | <code>number</code> | |
|
||||
| [error](#error-property) | <code>string</code> | |
|
||||
| [panelId](#panelid-property) | <code>number</code> | |
|
||||
| [panelName](#panelname-property) | <code>string</code> | |
|
||||
|
||||
### dataSize property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dataSize?: number;
|
||||
```
|
||||
|
||||
### datasourceId property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
datasourceId?: number;
|
||||
```
|
||||
|
||||
### datasourceName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
datasourceName: string;
|
||||
```
|
||||
|
||||
### duration property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
duration: number;
|
||||
```
|
||||
|
||||
### error property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
error?: string;
|
||||
```
|
||||
|
||||
### panelId property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
panelId?: number;
|
||||
```
|
||||
|
||||
### panelName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
panelName?: string;
|
||||
```
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## DataSourceSrv interface
|
||||
|
||||
This is the entry point for communicating with a datasource that is added as a plugin (both external and internal). Via this service you will get access to the [DataSourceApi](./data/datasourceapi.md) that have a rich API for communicating with the datasource.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -37,8 +39,8 @@ get(name?: string, scopedVars?: ScopedVars): Promise<DataSourceApi>;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| name | <code>string</code> | |
|
||||
| scopedVars | <code>ScopedVars</code> | |
|
||||
| name | <code>string</code> | name of the datasource plugin you want to use. |
|
||||
| scopedVars | <code>ScopedVars</code> | variables used to interpolate a templated passed as name. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## DataSourceWithBackend class
|
||||
|
||||
Extend this class to implement a data source plugin that is depending on the Grafana backend API.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -30,8 +32,12 @@ import { DataSourceWithBackend } from '@grafana/runtime';
|
||||
|
||||
| Method | Modifiers | Description |
|
||||
| --- | --- | --- |
|
||||
| [query(request)](#query-method) | | Ideally final -- any other implementation would be wrong! |
|
||||
| [testDatasource()](#testdatasource-method) | | |
|
||||
| [applyTemplateVariables(query)](#applytemplatevariables-method) | | Override to apply template variables |
|
||||
| [callHealthCheck()](#callhealthcheck-method) | | Run the datasource healthcheck |
|
||||
| [getResource(path, params)](#getresource-method) | | Make a GET request to the datasource resource path |
|
||||
| [postResource(path, body)](#postresource-method) | | Send a POST request to the datasource resource path |
|
||||
| [query(request)](#query-method) | | Ideally final -- any other implementation may not work as expected |
|
||||
| [testDatasource()](#testdatasource-method) | | Checks the plugin health |
|
||||
| [toDataQueryResponse(rsp)](#todataqueryresponse-method) | | This makes the arrow library loading async. |
|
||||
|
||||
### constructor(instanceSettings)
|
||||
@@ -49,9 +55,82 @@ constructor(instanceSettings: DataSourceInstanceSettings<TOptions>);
|
||||
| --- | --- | --- |
|
||||
| instanceSettings | <code>DataSourceInstanceSettings<TOptions></code> | |
|
||||
|
||||
### applyTemplateVariables method
|
||||
|
||||
Override to apply template variables
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
/** @virtual */
|
||||
applyTemplateVariables(query: DataQuery): DataQuery;
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| query | <code>DataQuery</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`DataQuery`
|
||||
|
||||
### callHealthCheck method
|
||||
|
||||
Run the datasource healthcheck
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
callHealthCheck(): Promise<HealthCheckResult>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<HealthCheckResult>`
|
||||
|
||||
### getResource method
|
||||
|
||||
Make a GET request to the datasource resource path
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
getResource(path: string, params?: any): Promise<any>;
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| path | <code>string</code> | |
|
||||
| params | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<any>`
|
||||
|
||||
### postResource method
|
||||
|
||||
Send a POST request to the datasource resource path
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
postResource(path: string, body?: any): Promise<any>;
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| path | <code>string</code> | |
|
||||
| body | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<any>`
|
||||
|
||||
### query method
|
||||
|
||||
Ideally final -- any other implementation would be wrong!
|
||||
Ideally final -- any other implementation may not work as expected
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
@@ -70,14 +149,16 @@ query(request: DataQueryRequest): Observable<DataQueryResponse>;
|
||||
|
||||
### testDatasource method
|
||||
|
||||
Checks the plugin health
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
testDatasource(): Promise<{}>;
|
||||
testDatasource(): Promise<any>;
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<{}>`
|
||||
`Promise<any>`
|
||||
|
||||
### toDataQueryResponse method
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## EchoBackend interface
|
||||
|
||||
Describes echo backends that can be registered to receive of events.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## EchoEvent interface
|
||||
|
||||
Describes an echo event.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -25,7 +27,7 @@ import { EchoEvent } from '@grafana/runtime';
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [meta](#meta-property) | <code>EchoMeta</code> | |
|
||||
| [payload](#payload-property) | <code>P</code> | |
|
||||
| [payload](#payload-property) | <code>P</code> | Event payload containing event specific data. |
|
||||
| [type](#type-property) | <code>EchoEventType</code> | |
|
||||
|
||||
### meta property
|
||||
@@ -38,6 +40,8 @@ meta: EchoMeta;
|
||||
|
||||
### payload property
|
||||
|
||||
Event payload containing event specific data.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### EchoEventType enum
|
||||
|
||||
Supported echo event types that can be sent via the [EchoSrv](./runtime/echosrv.md)<!-- -->.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## EchoMeta interface
|
||||
|
||||
Describes the meta information that are sent together with each event.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -30,9 +32,9 @@ import { EchoMeta } from '@grafana/runtime';
|
||||
| [ts](#ts-property) | <code>number</code> | A millisecond epoch |
|
||||
| [url](#url-property) | <code>string</code> | |
|
||||
| [userAgent](#useragent-property) | <code>string</code> | |
|
||||
| [userId](#userid-property) | <code>number</code> | |
|
||||
| [userLogin](#userlogin-property) | <code>string</code> | |
|
||||
| [userSignedIn](#usersignedin-property) | <code>boolean</code> | |
|
||||
| [userId](#userid-property) | <code>number</code> | The current users unique identifier. |
|
||||
| [userLogin](#userlogin-property) | <code>string</code> | The current users username used to login into Grafana e.g. email. |
|
||||
| [userSignedIn](#usersignedin-property) | <code>boolean</code> | True when user is logged in into Grafana. |
|
||||
| [windowSize](#windowsize-property) | <code>SizeMeta</code> | |
|
||||
|
||||
### screenSize property
|
||||
@@ -91,6 +93,8 @@ userAgent: string;
|
||||
|
||||
### userId property
|
||||
|
||||
The current users unique identifier.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -99,6 +103,8 @@ userId: number;
|
||||
|
||||
### userLogin property
|
||||
|
||||
The current users username used to login into Grafana e.g. email.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -107,6 +113,8 @@ userLogin: string;
|
||||
|
||||
### userSignedIn property
|
||||
|
||||
True when user is logged in into Grafana.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## EchoSrv interface
|
||||
|
||||
Used to send events to all the registered backends. This should be accessed via the [getEchoSrv()](./runtime/getechosrv.md) function. Will, by default, flush events to the backends every 10s or when the flush function is triggered.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -24,12 +26,14 @@ import { EchoSrv } from '@grafana/runtime';
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [addBackend(backend)](#addbackend-method) | |
|
||||
| [addEvent(event, meta)](#addevent-method) | |
|
||||
| [flush()](#flush-method) | |
|
||||
| [addBackend(backend)](#addbackend-method) | Add a new echo backend to the list of backends that will receive events. |
|
||||
| [addEvent(event, meta)](#addevent-method) | Call this to add event that will be sent to the echo backends upon next flush. |
|
||||
| [flush()](#flush-method) | Call this to flush current events to the echo backends. |
|
||||
|
||||
### addBackend method
|
||||
|
||||
Add a new echo backend to the list of backends that will receive events.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -47,6 +51,8 @@ addBackend(backend: EchoBackend): void;
|
||||
|
||||
### addEvent method
|
||||
|
||||
Call this to add event that will be sent to the echo backends upon next flush.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -56,8 +62,8 @@ addEvent<T extends EchoEvent>(event: Omit<T, 'meta'>, meta?: {}): void;
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| event | <code>Omit<T, 'meta'></code> | |
|
||||
| meta | <code>{}</code> | |
|
||||
| event | <code>Omit<T, 'meta'></code> | Object containing event information. |
|
||||
| meta | <code>{}</code> | Object that will extend/override the default meta object. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
@@ -65,6 +71,8 @@ addEvent<T extends EchoEvent>(event: Omit<T, 'meta'>, meta?: {}): void;
|
||||
|
||||
### flush method
|
||||
|
||||
Call this to flush current events to the echo backends.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,6 +12,10 @@ draft = true
|
||||
|
||||
### getAngularLoader() function
|
||||
|
||||
Used to retrieve the [AngularLoader](./runtime/angularloader.md) that enables the use of Angular components within a React component.
|
||||
|
||||
Please see the [AngularComponent](./runtime/angularcomponent.md) for a proper example.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### getBackendSrv variable
|
||||
|
||||
Used to retrieve the [BackendSrv](./runtime/backendsrv.md) that can be used to communicate via http(s) to a remote backend such as the Grafana backend, a datasource etc.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### getDataSourceSrv() function
|
||||
|
||||
Used to retrieve the [DataSourceSrv](./runtime/datasourcesrv.md) that is the entry point for communicating with a datasource that is added as a plugin (both external and internal).
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### getEchoSrv() function
|
||||
|
||||
Used to retrieve the [EchoSrv](./runtime/echosrv.md) that can be used to report events to registered echo backends.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### getLocationSrv() function
|
||||
|
||||
Used to retrieve the [LocationSrv](./runtime/locationsrv.md) that can be used to automatically navigate the user to a new place in Grafana.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
+7
-5
@@ -2,23 +2,25 @@
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "UrlQueryMap"
|
||||
title = "getTemplateSrv"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## UrlQueryMap type
|
||||
## getTemplateSrv variable
|
||||
|
||||
### UrlQueryMap type
|
||||
### getTemplateSrv variable
|
||||
|
||||
Used to retrieve the [TemplateSrv](./runtime/templatesrv.md) that can be used to fetch available template variables.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare type UrlQueryMap = Record<string, UrlQueryValue>;
|
||||
getTemplateSrv: () => TemplateSrv
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { UrlQueryMap } from '@grafana/runtime';
|
||||
import { getTemplateSrv } from '@grafana/runtime';
|
||||
```
|
||||
@@ -13,7 +13,7 @@ draft = true
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare class GrafanaBootConfig
|
||||
export declare class GrafanaBootConfig implements GrafanaConfig
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
@@ -55,13 +55,14 @@ import { GrafanaBootConfig } from '@grafana/runtime';
|
||||
| [licenseInfo](#licenseinfo-property) | | <code>LicenseInfo</code> | |
|
||||
| [loginError](#loginerror-property) | | <code>any</code> | |
|
||||
| [loginHint](#loginhint-property) | | <code>any</code> | |
|
||||
| [minRefreshInterval](#minrefreshinterval-property) | | <code>string</code> | |
|
||||
| [navTree](#navtree-property) | | <code>any</code> | |
|
||||
| [newPanelTitle](#newpaneltitle-property) | | <code>string</code> | |
|
||||
| [oauth](#oauth-property) | | <code>any</code> | |
|
||||
| [panels](#panels-property) | | <code>{</code><br/><code> [key: string]: PanelPluginMeta;</code><br/><code> }</code> | |
|
||||
| [passwordHint](#passwordhint-property) | | <code>any</code> | |
|
||||
| [phantomJSRenderer](#phantomjsrenderer-property) | | <code>boolean</code> | |
|
||||
| [pluginsToPreload](#pluginstopreload-property) | | <code>string[]</code> | |
|
||||
| [rendererAvailable](#rendereravailable-property) | | <code>boolean</code> | |
|
||||
| [samlEnabled](#samlenabled-property) | | <code>boolean</code> | |
|
||||
| [theme](#theme-property) | | <code>GrafanaTheme</code> | |
|
||||
| [verifyEmailEnabled](#verifyemailenabled-property) | | <code>boolean</code> | |
|
||||
@@ -285,6 +286,14 @@ loginError: any;
|
||||
loginHint: any;
|
||||
```
|
||||
|
||||
### minRefreshInterval property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
minRefreshInterval: string;
|
||||
```
|
||||
|
||||
### navTree property
|
||||
|
||||
<b>Signature</b>
|
||||
@@ -327,14 +336,6 @@ panels: {
|
||||
passwordHint: any;
|
||||
```
|
||||
|
||||
### phantomJSRenderer property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
phantomJSRenderer: boolean;
|
||||
```
|
||||
|
||||
### pluginsToPreload property
|
||||
|
||||
<b>Signature</b>
|
||||
@@ -343,6 +344,14 @@ phantomJSRenderer: boolean;
|
||||
pluginsToPreload: string[];
|
||||
```
|
||||
|
||||
### rendererAvailable property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
rendererAvailable: boolean;
|
||||
```
|
||||
|
||||
### samlEnabled property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "HealthCheckResult"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## HealthCheckResult interface
|
||||
|
||||
Describes the payload returned when checking the health of a data source plugin.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface HealthCheckResult
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { HealthCheckResult } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [details](#details-property) | <code>Record<string, any></code> | |
|
||||
| [message](#message-property) | <code>string</code> | |
|
||||
| [status](#status-property) | <code>HealthStatus</code> | |
|
||||
|
||||
### details property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
details?: Record<string, any>;
|
||||
```
|
||||
|
||||
### message property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
message: string;
|
||||
```
|
||||
|
||||
### status property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
status: HealthStatus;
|
||||
```
|
||||
@@ -0,0 +1,35 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "HealthStatus"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## HealthStatus enum
|
||||
|
||||
### HealthStatus enum
|
||||
|
||||
Describes the current healt status of a data source plugin.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare enum HealthStatus
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { HealthStatus } from '@grafana/runtime';
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| --- | --- | --- |
|
||||
| Error | <code>"ERROR"</code> | |
|
||||
| OK | <code>"OK"</code> | |
|
||||
| Unknown | <code>"UNKNOWN"</code> | |
|
||||
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### loadPluginCss() function
|
||||
|
||||
Use this to load css for a Grafana plugin by specifying a [PluginCssOptions](./runtime/plugincssoptions.md) containing styling for the dark and the light theme.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -26,7 +28,7 @@ import { loadPluginCss } from '@grafana/runtime';
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| options | <code>PluginCssOptions</code> | |
|
||||
| options | <code>PluginCssOptions</code> | plugin styling for light and dark theme. |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## LocationSrv interface
|
||||
|
||||
If you need to automatically navigate the user to a new place in the application this should be done via the LocationSrv and it will make sure to update the application state accordingly.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -24,15 +24,14 @@ import { LocationUpdate } from '@grafana/runtime';
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [partial](#partial-property) | <code>boolean</code> | Add the query argument to the existing URL |
|
||||
| [path](#path-property) | <code>string</code> | |
|
||||
| [query](#query-property) | <code>UrlQueryMap</code> | |
|
||||
| [partial](#partial-property) | <code>boolean</code> | If set to true, the query argument will be added to the existing URL. |
|
||||
| [path](#path-property) | <code>string</code> | Target path where you automatically wants to navigate the user. |
|
||||
| [query](#query-property) | <code>UrlQueryMap</code> | Specify this value if you want to add values to the query string of the URL. |
|
||||
| [replace](#replace-property) | <code>boolean</code> | |
|
||||
| [routeParams](#routeparams-property) | <code>UrlQueryMap</code> | Do not change this unless you are the angular router |
|
||||
|
||||
### partial property
|
||||
|
||||
Add the query argument to the existing URL
|
||||
If set to true, the query argument will be added to the existing URL.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
@@ -42,6 +41,8 @@ partial?: boolean;
|
||||
|
||||
### path property
|
||||
|
||||
Target path where you automatically wants to navigate the user.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -50,6 +51,8 @@ path?: string;
|
||||
|
||||
### query property
|
||||
|
||||
Specify this value if you want to add values to the query string of the URL.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -63,13 +66,3 @@ query?: UrlQueryMap;
|
||||
```typescript
|
||||
replace?: boolean;
|
||||
```
|
||||
|
||||
### routeParams property
|
||||
|
||||
Do not change this unless you are the angular router
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
routeParams?: UrlQueryMap;
|
||||
```
|
||||
|
||||
@@ -10,6 +10,8 @@ draft = true
|
||||
|
||||
## MetaAnalyticsEvent interface
|
||||
|
||||
Describes meta analytics event with predefined [EchoEventType.MetaAnalytics](./runtime/echoeventtype/metaanalytics.md) type.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "MetaAnalyticsEventName"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## MetaAnalyticsEventName enum
|
||||
|
||||
### MetaAnalyticsEventName enum
|
||||
|
||||
The meta analytics events that can be added to the echo service.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare enum MetaAnalyticsEventName
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { MetaAnalyticsEventName } from '@grafana/runtime';
|
||||
```
|
||||
|
||||
## Enumeration Members
|
||||
|
||||
| Member | Value | Description |
|
||||
| --- | --- | --- |
|
||||
| DashboardView | <code>"dashboard-view"</code> | |
|
||||
| DataRequest | <code>"data-request"</code> | |
|
||||
|
||||
@@ -8,127 +8,19 @@ type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## MetaAnalyticsEventPayload interface
|
||||
## MetaAnalyticsEventPayload type
|
||||
|
||||
### MetaAnalyticsEventPayload type
|
||||
|
||||
Describes the meta analytics payload passed with the [MetaAnalyticsEvent](./runtime/metaanalyticsevent.md)
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface MetaAnalyticsEventPayload
|
||||
export declare type MetaAnalyticsEventPayload = DashboardViewEventPayload | DataRequestEventPayload;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { MetaAnalyticsEventPayload } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [dashboardId](#dashboardid-property) | <code>number</code> | |
|
||||
| [dashboardName](#dashboardname-property) | <code>string</code> | |
|
||||
| [dashboardUid](#dashboarduid-property) | <code>string</code> | |
|
||||
| [dataSize](#datasize-property) | <code>number</code> | |
|
||||
| [datasourceId](#datasourceid-property) | <code>number</code> | |
|
||||
| [datasourceName](#datasourcename-property) | <code>string</code> | |
|
||||
| [duration](#duration-property) | <code>number</code> | |
|
||||
| [error](#error-property) | <code>string</code> | |
|
||||
| [eventName](#eventname-property) | <code>string</code> | |
|
||||
| [folderName](#foldername-property) | <code>string</code> | |
|
||||
| [panelId](#panelid-property) | <code>number</code> | |
|
||||
| [panelName](#panelname-property) | <code>string</code> | |
|
||||
|
||||
### dashboardId property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dashboardId?: number;
|
||||
```
|
||||
|
||||
### dashboardName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dashboardName?: string;
|
||||
```
|
||||
|
||||
### dashboardUid property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dashboardUid?: string;
|
||||
```
|
||||
|
||||
### dataSize property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dataSize?: number;
|
||||
```
|
||||
|
||||
### datasourceId property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
datasourceId?: number;
|
||||
```
|
||||
|
||||
### datasourceName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
datasourceName: string;
|
||||
```
|
||||
|
||||
### duration property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
duration: number;
|
||||
```
|
||||
|
||||
### error property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
error?: string;
|
||||
```
|
||||
|
||||
### eventName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
eventName: string;
|
||||
```
|
||||
|
||||
### folderName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
folderName?: string;
|
||||
```
|
||||
|
||||
### panelId property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
panelId?: number;
|
||||
```
|
||||
|
||||
### panelName property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
panelName?: string;
|
||||
```
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "PluginCssOptions"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## PluginCssOptions interface
|
||||
|
||||
Option to specify a plugin css that should be applied for the dark and the light theme.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface PluginCssOptions
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { PluginCssOptions } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [dark](#dark-property) | <code>string</code> | |
|
||||
| [light](#light-property) | <code>string</code> | |
|
||||
|
||||
### dark property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
dark: string;
|
||||
```
|
||||
|
||||
### light property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
light: string;
|
||||
```
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### registerEchoBackend variable
|
||||
|
||||
Used to register echo backends that will receive Grafana echo events during application runtime.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -12,6 +12,8 @@ draft = true
|
||||
|
||||
### reportMetaAnalytics variable
|
||||
|
||||
Helper function to report meta analytics to the [EchoSrv](./runtime/echosrv.md)<!-- -->.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "setAngularLoader"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## setAngularLoader() function
|
||||
|
||||
### setAngularLoader() function
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare function setAngularLoader(v: AngularLoader): void;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { setAngularLoader } from '@grafana/runtime';
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| v | <code>AngularLoader</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "setBackendSrv"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## setBackendSrv variable
|
||||
|
||||
### setBackendSrv variable
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
setBackendSrv: (instance: BackendSrv) => void
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { setBackendSrv } from '@grafana/runtime';
|
||||
```
|
||||
@@ -1,34 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "setDataSourceSrv"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## setDataSourceSrv() function
|
||||
|
||||
### setDataSourceSrv() function
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare function setDataSourceSrv(instance: DataSourceSrv): void;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { setDataSourceSrv } from '@grafana/runtime';
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| instance | <code>DataSourceSrv</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "setEchoSrv"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## setEchoSrv() function
|
||||
|
||||
### setEchoSrv() function
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare function setEchoSrv(instance: EchoSrv): void;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { setEchoSrv } from '@grafana/runtime';
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| instance | <code>EchoSrv</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "setLocationSrv"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## setLocationSrv() function
|
||||
|
||||
### setLocationSrv() function
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare function setLocationSrv(instance: LocationSrv): void;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { setLocationSrv } from '@grafana/runtime';
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| instance | <code>LocationSrv</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`void`
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "SizeMeta"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## SizeMeta interface
|
||||
|
||||
Describes a size with width/height
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface SizeMeta
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { SizeMeta } from '@grafana/runtime';
|
||||
```
|
||||
<b>Properties</b>
|
||||
|
||||
| Property | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| [height](#height-property) | <code>number</code> | |
|
||||
| [width](#width-property) | <code>number</code> | |
|
||||
|
||||
### height property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
height: number;
|
||||
```
|
||||
|
||||
### width property
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
width: number;
|
||||
```
|
||||
@@ -1,24 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "SystemJS"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## SystemJS variable
|
||||
|
||||
### SystemJS variable
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
SystemJS: any
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { SystemJS } from '@grafana/runtime';
|
||||
```
|
||||
@@ -0,0 +1,43 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "TemplateSrv"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## TemplateSrv interface
|
||||
|
||||
Via the TemplateSrv consumers get access to all the available template variables that can be used within the current active dashboard.
|
||||
|
||||
For a more in-depth description visit: https://grafana.com/docs/grafana/latest/reference/templating
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export interface TemplateSrv
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { TemplateSrv } from '@grafana/runtime';
|
||||
```
|
||||
<b>Methods</b>
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [getVariables()](#getvariables-method) | |
|
||||
|
||||
### getVariables method
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
getVariables(): VariableModel[];
|
||||
```
|
||||
<b>Returns:</b>
|
||||
|
||||
`VariableModel[]`
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "UrlQueryValue"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
draft = true
|
||||
+++
|
||||
|
||||
## UrlQueryValue type
|
||||
|
||||
### UrlQueryValue type
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare type UrlQueryValue = string | number | boolean | string[] | number[] | boolean[] | undefined | null;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { UrlQueryValue } from '@grafana/runtime';
|
||||
```
|
||||
Reference in New Issue
Block a user