From 17a14a8a482beb9d193b5d0e419fbe33ac8fa1a1 Mon Sep 17 00:00:00 2001 From: Rob McGuire Date: Tue, 10 Mar 2020 03:50:14 -0700 Subject: [PATCH] Docs: Plugin.json: Fix property descriptions, add missing properties, add example (#22281) * Fix property descriptions, add missing properties Fixes incorrect property descriptions, adds missing properties, and adds an up-to-date example. * Update logo descriptions Updates the "large" and "small" logo descriptions to specify SVG image type requirement, and that they may be identical * Update docs/sources/plugins/developing/plugin.json.md --- .../sources/plugins/developing/plugin.json.md | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/docs/sources/plugins/developing/plugin.json.md b/docs/sources/plugins/developing/plugin.json.md index 2d21a665207..69c8df510b4 100644 --- a/docs/sources/plugins/developing/plugin.json.md +++ b/docs/sources/plugins/developing/plugin.json.md @@ -12,17 +12,28 @@ weight = 8 The plugin.json file is mandatory for all plugins. When Grafana starts it will scan the plugin folders and mount every folder that contains a plugin.json file unless the folder contains a subfolder named `dist`. In that case grafana will mount the `dist` folder instead. -## Plugin JSON Schema +## Plugin.json Schema -| Property | Description | -| ------------- |-------------| -| id | unique name of the plugin - [conventions described in styleguide]({{< relref "code-styleguide.md" >}}) | -| type | panel/datasource/app | -| name | Human readable name of the plugin | -| info.description | Description of plugin. Used for searching grafana.com plugins | -| info.author | | -| info.keywords | plugin keywords. Used for search on grafana net| -| info.logos | link to project logos | -| info.version | project version of this commit. Must be semver | -| dependencies.grafanaVersion | Required grafana backend version for this plugin | -| dependencies.plugins | required plugins for this plugin. | +| Property | Description | +| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | +| id | Unique name of the plugin. See [naming conventions described in styleguide]({{< relref "code-styleguide.md" >}}) | +| type | One of `app`, `datasource`, `panel` | +| name | Human-readable name of the plugin | +| dependencies.grafanaVersion | Required Grafana version for this plugin | +| dependencies.plugins | An array of required plugins on which this plugin depends | +| info.author.name | Author's name | +| info.author.url | Link to author's website | +| info.description | Description of plugin. Used for search on grafana.com | +| info.keywords | Array of plugin keywords. Used for search on grafana.com | +| info.links | An array of link objects to be displayed on this plugin's project page in the form `{name: 'foo', url: 'http://example.com'}` | +| info.logos.small | Link to the "small" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image. | +| info.logos.large | Link to the "large" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image. | +| info.screenshots | An array of screenshot objects in the form `{name: 'bar', path: 'img/screenshot.png'}` | +| info.updated | Date when this plugin was built. Use `%TODAY%` for Grafana to autopopulate this value. | +| info.version | Project version of this commit. Use `%VERSION%` for Grafana to autopopulate this value. | + +## Plugin.json Example + +Here's an example of an up-to-date plugin.json file: + +https://github.com/grafana/clock-panel/blob/master/src/plugin.json