mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 23:23:10 +08:00
Update codebox (#9430)
* updated the codeboxes in docs * codebox change from json to http
This commit is contained in:

committed by
Torkel Ödegaard

parent
19b5d91b75
commit
81be4e2612
@ -23,7 +23,7 @@ The most important fields are the first three, especially the id. The convention
|
||||
|
||||
Examples:
|
||||
|
||||
```
|
||||
```bash
|
||||
raintank-worldping-app
|
||||
grafana-simple-json-datasource
|
||||
grafana-piechart-panel
|
||||
@ -66,7 +66,7 @@ The README.md file is rendered both on Grafana.net and in the plugins section in
|
||||
|
||||
Here is a typical directory structure for a plugin.
|
||||
|
||||
```
|
||||
```bash
|
||||
johnnyb-awesome-datasource
|
||||
|-- dist
|
||||
|-- spec
|
||||
|
@ -45,7 +45,7 @@ The javascript object that communicates with the database and transforms data to
|
||||
|
||||
The Datasource should contain the following functions:
|
||||
|
||||
```
|
||||
```javascript
|
||||
query(options) //used by panels to get data
|
||||
testDatasource() //used by datasource configuration page to make sure the connection is working
|
||||
annotationQuery(options) // used by dashboards to get annotations
|
||||
|
@ -30,37 +30,37 @@ On Linux systems the grafana-cli will assume that the grafana plugin directory i
|
||||
### Grafana-cli Commands
|
||||
|
||||
List available plugins
|
||||
```
|
||||
```bash
|
||||
grafana-cli plugins list-remote
|
||||
```
|
||||
|
||||
Install the latest version of a plugin
|
||||
```
|
||||
```bash
|
||||
grafana-cli plugins install <plugin-id>
|
||||
```
|
||||
|
||||
Install a specific version of a plugin
|
||||
```
|
||||
```bash
|
||||
grafana-cli plugins install <plugin-id> <version>
|
||||
```
|
||||
|
||||
List installed plugins
|
||||
```
|
||||
```bash
|
||||
grafana-cli plugins ls
|
||||
```
|
||||
|
||||
Update all installed plugins
|
||||
```
|
||||
```bash
|
||||
grafana-cli plugins update-all
|
||||
```
|
||||
|
||||
Update one plugin
|
||||
```
|
||||
```bash
|
||||
grafana-cli plugins update <plugin-id>
|
||||
```
|
||||
|
||||
Remove one plugin
|
||||
```
|
||||
```bash
|
||||
grafana-cli plugins remove <plugin-id>
|
||||
```
|
||||
|
||||
@ -73,7 +73,7 @@ The Download URL from Grafana.com API is in this form:
|
||||
`https://grafana.com/api/plugins/<plugin id>/versions/<version number>/download`
|
||||
|
||||
You can specify a local URL by using the `--pluginUrl` option.
|
||||
```
|
||||
```bash
|
||||
grafana-cli --pluginUrl https://nexus.company.com/grafana/plugins/<plugin-id>-<plugin-version>.zip plugins install <plugin-id>
|
||||
```
|
||||
|
||||
@ -84,7 +84,7 @@ To manually install a Plugin via the Grafana.com API:
|
||||
{{< imgbox img="/img/docs/installation-tab.png" caption="Installation Tab" >}}
|
||||
|
||||
2. Use the Grafana API to find the plugin using this url `https://grafana.com/api/plugins/<plugin id from step 1>`. For example: https://grafana.com/api/plugins/jdbranham-diagram-panel should return:
|
||||
```
|
||||
```bash
|
||||
{
|
||||
"id": 145,
|
||||
"typeId": 3,
|
||||
@ -97,7 +97,7 @@ To manually install a Plugin via the Grafana.com API:
|
||||
```
|
||||
|
||||
3. Find the download link:
|
||||
```
|
||||
```bash
|
||||
{
|
||||
"rel": "download",
|
||||
"href": "/plugins/jdbranham-diagram-panel/versions/1.4.0/download"
|
||||
|
Reference in New Issue
Block a user