Docs: Sync master docs against next version (#32602)

Co-authored-by: Robby Milo <robbymilo@gmail.com>
This commit is contained in:
Torkel Ödegaard
2021-04-12 09:42:10 +02:00
committed by GitHub
parent 7b23ed728f
commit 9873809547
193 changed files with 219 additions and 219 deletions

View File

@@ -1,6 +1,6 @@
+++
title = "Build a plugin"
aliases = ["/docs/grafana/latest/plugins/developing/"]
aliases = ["/docs/grafana/next/plugins/developing/"]
+++
# Build a plugin

View File

@@ -1,6 +1,6 @@
+++
title = "Add authentication for data source plugins"
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/latest/developers/plugins/authentication/"]
aliases = ["/docs/grafana/next/plugins/developing/auth-for-datasources/", "/docs/grafana/next/developers/plugins/authentication/"]
+++
# Add authentication for data source plugins
@@ -11,7 +11,7 @@ When a user saves a password or any other sensitive data as a data source option
To minimize the amount of sensitive information sent to and from the browser, data source plugins can use the Grafana _data source proxy_. When using the data source proxy, any requests containing sensitive information go through the Grafana server. No sensitive data is sent to the browser after the data is saved.
Some data sources, like [Prometheus](https://grafana.com/docs/grafana/latest/features/datasources/prometheus/) and [InfluxDB](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/), allow users to configure whether to use the data source proxy, through a setting called _access modes_.
Some data sources, like [Prometheus](https://grafana.com/docs/grafana/next/features/datasources/prometheus/) and [InfluxDB](https://grafana.com/docs/grafana/next/features/datasources/influxdb/), allow users to configure whether to use the data source proxy, through a setting called _access modes_.
## Add a proxy route to your plugin

View File

@@ -101,4 +101,4 @@ const firstResult = new MutableDataFrame({
});
```
For possible options, refer to [PreferredVisualisationType](https://grafana.com/docs/grafana/latest/packages_api/data/preferredvisualisationtype/).
For possible options, refer to [PreferredVisualisationType](https://grafana.com/docs/grafana/next/packages_api/data/preferredvisualisationtype/).

View File

@@ -60,7 +60,7 @@ For data sources, you need to use the [getTemplateSrv]({{< relref "../../package
## Format multi-value variables
When a user selects multiple values for variable, the value of the interpolated variable depends on the [variable format](https://grafana.com/docs/grafana/latest/variables/advanced-variable-format-options/).
When a user selects multiple values for variable, the value of the interpolated variable depends on the [variable format](https://grafana.com/docs/grafana/next/variables/advanced-variable-format-options/).
A data source can define the default format option when no format is specified by adding a third argument to the interpolation function.
@@ -76,7 +76,7 @@ Now, when users write `$service`, the query looks like this:
SELECT * FROM services WHERE id IN (admin,auth,billing)
```
For more information on the available variable formats, refer to [Advanced variable format options](https://grafana.com/docs/grafana/latest/variables/advanced-variable-format-options/).
For more information on the available variable formats, refer to [Advanced variable format options](https://grafana.com/docs/grafana/next/variables/advanced-variable-format-options/).
## Set a variable from your plugin

View File

@@ -1,7 +1,7 @@
+++
title = "Backend plugins"
keywords = ["grafana", "plugins", "backend", "plugin", "backend-plugins", "documentation"]
aliases = ["/docs/grafana/latest/plugins/developing/backend-plugins-guide/"]
aliases = ["/docs/grafana/next/plugins/developing/backend-plugins-guide/"]
+++
# Backend plugins
@@ -49,7 +49,7 @@ The resources capability allows a backend plugin to handle custom HTTP requests
Examples of use cases for implementing resources:
- Implement a custom data source proxy in case certain authentication/authorization or other requirements are required/needed that are not supported in Grafana's [built-in data proxy](https://grafana.com/docs/grafana/latest/http_api/data_source/#data-source-proxy-calls).
- Implement a custom data source proxy in case certain authentication/authorization or other requirements are required/needed that are not supported in Grafana's [built-in data proxy](https://grafana.com/docs/grafana/next/http_api/data_source/#data-source-proxy-calls).
- Return data or information in a format suitable to use within a data source query editor to provide auto-complete functionality.
- Return static resources, such as images or files.
- Send a command to a device, such as a micro controller or IOT device.

View File

@@ -1,6 +1,6 @@
+++
title = "Legacy plugins"
aliases = ["/docs/grafana/latest/plugins/development/", "/docs/grafana/latest/plugins/datasources/", "/docs/grafana/latest/plugins/apps/", "/docs/grafana/latest/plugins/panels/", "/docs/grafana/latest/plugins/developing/development/"]
aliases = ["/docs/grafana/next/plugins/development/", "/docs/grafana/next/plugins/datasources/", "/docs/grafana/next/plugins/apps/", "/docs/grafana/next/plugins/panels/", "/docs/grafana/next/plugins/developing/development/"]
+++
# Legacy plugins

View File

@@ -1,7 +1,7 @@
+++
title = "Legacy app plugins"
keywords = ["grafana", "plugins", "documentation"]
aliases = ["/docs/grafana/latest/plugins/developing/apps/"]
aliases = ["/docs/grafana/next/plugins/developing/apps/"]
+++
# Legacy app plugins

View File

@@ -1,7 +1,7 @@
+++
title = "Legacy data source plugins"
keywords = ["grafana", "plugins", "documentation"]
aliases = ["/docs/grafana/latest/plugins/developing/datasources/"]
aliases = ["/docs/grafana/next/plugins/developing/datasources/"]
+++
# Legacy data source plugins

View File

@@ -1,6 +1,6 @@
+++
title = "Legacy defaults and editor mode"
aliases = ["/docs/grafana/latest/plugins/developing/defaults-and-editor-mode/"]
aliases = ["/docs/grafana/next/plugins/developing/defaults-and-editor-mode/"]
+++
# Legacy defaults and editor mode

View File

@@ -1,7 +1,7 @@
+++
title = "Legacy panel plugins"
keywords = ["grafana", "plugins", "panel", "documentation"]
aliases = ["/docs/grafana/latest/plugins/developing/panels/"]
aliases = ["/docs/grafana/next/plugins/developing/panels/"]
+++
# Legacy panel plugins

View File

@@ -1,6 +1,6 @@
+++
title = "Legacy review guidelines"
aliases = ["/docs/grafana/latest/plugins/developing/plugin-review-guidelines/"]
aliases = ["/docs/grafana/next/plugins/developing/plugin-review-guidelines/"]
+++
# Legacy review guidelines

View File

@@ -1,6 +1,6 @@
+++
title = "Legacy snapshot mode"
aliases = ["/docs/grafana/latest/plugins/developing/snapshot-mode/"]
aliases = ["/docs/grafana/next/plugins/developing/snapshot-mode/"]
+++
# Legacy snapshot mode

View File

@@ -1,6 +1,6 @@
+++
title = "Legacy code style guide"
aliases = ["/docs/grafana/latest/plugins/developing/code-styleguide/"]
aliases = ["/docs/grafana/next/plugins/developing/code-styleguide/"]
+++
# Legacy code style guide

View File

@@ -4,7 +4,7 @@
# -------------------------------------------------------------------------
title = "plugin.json"
keywords = ["grafana", "plugins", "documentation"]
aliases = ["/docs/grafana/latest/plugins/developing/plugin.json/"]
aliases = ["/docs/grafana/next/plugins/developing/plugin.json/"]
+++
# plugin.json
@@ -33,7 +33,7 @@ The plugin.json file is required for all plugins. When Grafana starts, it scans
| `metrics` | boolean | No | For data source plugins. If the plugin supports metric queries. Used in the Explore feature. |
| `preload` | boolean | No | Initialize plugin on startup. By default, the plugin initializes on first use. |
| `queryOptions` | [object](#queryoptions) | No | For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed. |
| `routes` | [object](#routes)[] | No | For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/). |
| `routes` | [object](#routes)[] | No | For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/next/developers/plugins/authentication/). |
| `skipDataQuery` | boolean | No | For panel plugins. Hides the query editor. |
| `state` | string | No | Marks a plugin as a pre-release. Possible values are: `alpha`, `beta`. |
| `streaming` | boolean | No | For data source plugins. If the plugin supports streaming. |
@@ -168,7 +168,7 @@ For data source plugins. There is a query options section in the plugin's query
## routes
For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/).
For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/next/developers/plugins/authentication/).
### Properties

View File

@@ -4,7 +4,7 @@
# -------------------------------------------------------------------------
title = "plugin.json"
keywords = ["grafana", "plugins", "documentation"]
aliases = ["/docs/grafana/latest/plugins/developing/plugin.json/"]
aliases = ["/docs/grafana/next/plugins/developing/plugin.json/"]
+++
{{ .Markdown 1 }}

View File

@@ -141,9 +141,9 @@ Before 7.0, data source and panel plugins exchanged data using either time serie
Grafana 7.0 is backward compatible with the old data format used in previous versions. Panels and data sources using the old format will still work with plugins using the new data frame format.
The `DataQueryResponse` returned by the `query` method can be either a [LegacyResponseData](https://grafana.com/docs/grafana/latest/packages_api/data/legacyresponsedata/) or a [DataFrame](https://grafana.com/docs/grafana/latest/packages_api/data/dataframe/).
The `DataQueryResponse` returned by the `query` method can be either a [LegacyResponseData](https://grafana.com/docs/grafana/next/packages_api/data/legacyresponsedata/) or a [DataFrame](https://grafana.com/docs/grafana/next/packages_api/data/dataframe/).
The [toDataFrame()](https://grafana.com/docs/grafana/latest/packages_api/data/todataframe/) function converts a legacy response, such as `TimeSeries` or `Table`, to a `DataFrame`. Use it to gradually move your code to the new format.
The [toDataFrame()](https://grafana.com/docs/grafana/next/packages_api/data/todataframe/) function converts a legacy response, such as `TimeSeries` or `Table`, to a `DataFrame`. Use it to gradually move your code to the new format.
```ts
import { toDataFrame } from '@grafana/data';
@@ -160,7 +160,7 @@ async query(options: DataQueryRequest<MyQuery>): Promise<DataQueryResponse> {
}
```
For more information, refer to [Data frames](https://grafana.com/docs/grafana/latest/developers/plugins/data-frames/).
For more information, refer to [Data frames](https://grafana.com/docs/grafana/next/developers/plugins/data-frames/).
## Troubleshoot plugin migration

View File

@@ -1,7 +1,7 @@
+++
title = "Package a plugin"
type = "docs"
aliases = ["/docs/grafana/latest/developers/plugins/share-a-plugin/"]
aliases = ["/docs/grafana/next/developers/plugins/share-a-plugin/"]
+++
# Package a plugin

View File

@@ -322,10 +322,10 @@
},
"routes": {
"type": "array",
"description": "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/).",
"description": "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/next/developers/plugins/authentication/).",
"items": {
"type": "object",
"description": "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/).",
"description": "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/next/developers/plugins/authentication/).",
"additionalProperties": false,
"properties": {
"path": {