mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: generated a 7.0 version of the packages reference docs. (#24708)
* fixes so we match the transformer based on name properly. * changed the signature on the FieldMatcher. * introduced a names option so you can filter in name specificly. * changed so the matcher UI uses the new options format. * moved the exported functions together. * changing editors a bit. * made the filter by name work with both regex and name filtering. * fixed failing tests and make sure we always parse regex the same way. * removed unused code. * simplified to make the existing field overrides still working. * fixed issue reported by hugo. * added tests for the name matcher. * added tests for filter by name. * added more tests. * generated new version of the packages docs. * fixed spelling error. * regenerated the docs.
This commit is contained in:
@@ -35,6 +35,8 @@ A library containing services, configurations etc. used to interact with the Gra
|
||||
| [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. |
|
||||
| [toDataQueryError(err)](./todataqueryerror/) | Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error filds |
|
||||
| [toDataQueryResponse(res)](./todataqueryresponse/) | Parse the results from \`<!-- -->/api/ds/query |
|
||||
|
||||
## Interfaces
|
||||
|
||||
@@ -58,7 +60,7 @@ A library containing services, configurations etc. used to interact with the Gra
|
||||
| [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/variables/templates-and-variables |
|
||||
| [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
|
||||
|
||||
@@ -66,6 +68,7 @@ A library containing services, configurations etc. used to interact with the Gra
|
||||
| --- | --- |
|
||||
| [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. |
|
||||
| [getLegacyAngularInjector](./getlegacyangularinjector/) | <b><i>(BETA)</i></b> WARNING: this function provides a temporary way for plugins to access anything in the angular injector. While the migration from angular to react continues, there are a few options that do not yet have good alternatives. Note that use of this function will be removed in the future. |
|
||||
| [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)<!-- -->. |
|
||||
|
||||
@@ -37,7 +37,6 @@ import { DataSourceWithBackend } from '@grafana/runtime';
|
||||
| [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)
|
||||
|
||||
@@ -159,22 +158,3 @@ testDatasource(): Promise<any>;
|
||||
|
||||
`Promise<any>`
|
||||
|
||||
### toDataQueryResponse method
|
||||
|
||||
This makes the arrow library loading async.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
toDataQueryResponse(rsp: any): Promise<DataQueryResponse>;
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| rsp | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`Promise<DataQueryResponse>`
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "getLegacyAngularInjector"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
## getLegacyAngularInjector variable
|
||||
|
||||
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
||||
>
|
||||
|
||||
### getLegacyAngularInjector variable
|
||||
|
||||
WARNING: this function provides a temporary way for plugins to access anything in the angular injector. While the migration from angular to react continues, there are a few options that do not yet have good alternatives. Note that use of this function will be removed in the future.
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
getLegacyAngularInjector: () => auto.IInjectorService
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { getLegacyAngularInjector } from '@grafana/runtime';
|
||||
```
|
||||
@@ -11,7 +11,7 @@ type = "docs"
|
||||
|
||||
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/variables/templates-and-variables
|
||||
For a more in-depth description visit: https://grafana.com/docs/grafana/latest/reference/templating
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
@@ -27,10 +27,13 @@ import { TemplateSrv } from '@grafana/runtime';
|
||||
|
||||
| Method | Description |
|
||||
| --- | --- |
|
||||
| [getVariables()](#getvariables-method) | |
|
||||
| [getVariables()](#getvariables-method) | List the dashboard variables |
|
||||
| [replace(target, scopedVars, format)](#replace-method) | Replace the values within the target string. See also |
|
||||
|
||||
### getVariables method
|
||||
|
||||
List the dashboard variables
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
@@ -40,3 +43,24 @@ getVariables(): VariableModel[];
|
||||
|
||||
`VariableModel[]`
|
||||
|
||||
### replace method
|
||||
|
||||
Replace the values within the target string. See also
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
replace(target: string, scopedVars?: ScopedVars, format?: string | Function): string;
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| target | <code>string</code> | |
|
||||
| scopedVars | <code>ScopedVars</code> | |
|
||||
| format | <code>string | Function</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`string`
|
||||
|
||||
|
||||
35
docs/sources/packages_api/runtime/todataqueryerror.md
Normal file
35
docs/sources/packages_api/runtime/todataqueryerror.md
Normal file
@@ -0,0 +1,35 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "toDataQueryError"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
## toDataQueryError() function
|
||||
|
||||
### toDataQueryError() function
|
||||
|
||||
Convert an object into a DataQueryError -- if this is an HTTP response, it will put the correct values in the error filds
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare function toDataQueryError(err: any): DataQueryError;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { toDataQueryError } from '@grafana/runtime';
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| err | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`DataQueryError`
|
||||
|
||||
35
docs/sources/packages_api/runtime/todataqueryresponse.md
Normal file
35
docs/sources/packages_api/runtime/todataqueryresponse.md
Normal file
@@ -0,0 +1,35 @@
|
||||
+++
|
||||
# -----------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by API Documenter.
|
||||
# -----------------------------------------------------------------------
|
||||
title = "toDataQueryResponse"
|
||||
keywords = ["grafana","documentation","sdk","@grafana/runtime"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
## toDataQueryResponse() function
|
||||
|
||||
### toDataQueryResponse() function
|
||||
|
||||
Parse the results from \`<!-- -->/api/ds/query
|
||||
|
||||
<b>Signature</b>
|
||||
|
||||
```typescript
|
||||
export declare function toDataQueryResponse(res: any): DataQueryResponse;
|
||||
```
|
||||
<b>Import</b>
|
||||
|
||||
```typescript
|
||||
import { toDataQueryResponse } from '@grafana/runtime';
|
||||
```
|
||||
<b>Parameters</b>
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| res | <code>any</code> | |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
`DataQueryResponse`
|
||||
|
||||
Reference in New Issue
Block a user