Docs: sync plugin JSON info in the different files (first part) (#63750)
This commit is contained in:
+115
-112
@@ -14,11 +14,15 @@ seqs: [
|
||||
schemas: [
|
||||
{
|
||||
// Unique name of the plugin. If the plugin is published on
|
||||
// grafana.com, then the plugin id has to follow the naming
|
||||
// grafana.com, then the plugin `id` has to follow the naming
|
||||
// conventions.
|
||||
id: string & strings.MinRunes(1)
|
||||
id: =~"^([0-9a-z]+\\-([0-9a-z]+\\-)?(\(strings.Join([ for t in _types {t}], "|"))))|(alertGroups|alertlist|annolist|barchart|bargauge|candlestick|canvas|dashlist|debug|gauge|geomap|gettingstarted|graph|heatmap|histogram|icon|live|logs|news|nodeGraph|piechart|pluginlist|stat|state-timeline|status-history|table|table-old|text|timeseries|traces|welcome|xychart|alertmanager|cloudwatch|dashboard|elasticsearch|grafana|grafana-azure-monitor-datasource|graphite|influxdb|jaeger|loki|mixed|mssql|mysql|opentsdb|postgres|prometheus|stackdriver|tempo|testdata|zipkin|phlare|parca)$"
|
||||
|
||||
// Human-readable name of the plugin that is shown to the user in
|
||||
// the UI.
|
||||
name: string
|
||||
|
||||
// The set of all plugin types. This hidden field exists solely
|
||||
// so that the set can be string-interpolated into other fields.
|
||||
_types: ["app", "datasource", "panel", "renderer", "secretsmanager"]
|
||||
@@ -31,9 +35,116 @@ seqs: [
|
||||
// a superset of plugin types.
|
||||
#IncludeType: type | "dashboard" | "page"
|
||||
|
||||
// Human-readable name of the plugin that is shown to the user in
|
||||
// the UI.
|
||||
name: string
|
||||
// Metadata about the plugin
|
||||
info: #Info
|
||||
|
||||
// Metadata about a Grafana plugin. Some fields are used on the plugins
|
||||
// page in Grafana and others on grafana.com, if the plugin is published.
|
||||
#Info: {
|
||||
// Information about the plugin author
|
||||
author?: {
|
||||
// Author's name
|
||||
name?: string
|
||||
|
||||
// Author's name
|
||||
email?: string
|
||||
|
||||
// Link to author's website
|
||||
url?: string
|
||||
}
|
||||
|
||||
// Build information
|
||||
build?: #BuildInfo
|
||||
|
||||
// Description of plugin. Used on the plugins page in Grafana and
|
||||
// for search on grafana.com.
|
||||
description?: string
|
||||
|
||||
// Array of plugin keywords. Used for search on grafana.com.
|
||||
keywords: [...string]
|
||||
// should be this, but CUE to openapi converter screws this up
|
||||
// by inserting a non-concrete default.
|
||||
// keywords: [string, ...string]
|
||||
|
||||
// An array of link objects to be displayed on this plugin's
|
||||
// project page in the form `{name: 'foo', url:
|
||||
// 'http://example.com'}`
|
||||
links?: [...{
|
||||
name?: string
|
||||
url?: string
|
||||
}]
|
||||
|
||||
// SVG images that are used as plugin icons
|
||||
logos?: {
|
||||
// Link to the "small" version of the plugin logo, which must be
|
||||
// an SVG image. "Large" and "small" logos can be the same image.
|
||||
small: string
|
||||
|
||||
// Link to the "large" version of the plugin logo, which must be
|
||||
// an SVG image. "Large" and "small" logos can be the same image.
|
||||
large: string
|
||||
}
|
||||
|
||||
// An array of screenshot objects in the form `{name: 'bar', path:
|
||||
// 'img/screenshot.png'}`
|
||||
screenshots?: [...{
|
||||
name?: string
|
||||
path?: string
|
||||
}]
|
||||
|
||||
// Date when this plugin was built
|
||||
updated?: =~"^(\\d{4}-\\d{2}-\\d{2}|\\%TODAY\\%)$"
|
||||
|
||||
// Project version of this commit, e.g. `6.7.x`
|
||||
version?: =~"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)|(\\%VERSION\\%)$"
|
||||
}
|
||||
|
||||
#BuildInfo: {
|
||||
// Time when the plugin was built, as a Unix timestamp
|
||||
time?: int64
|
||||
repo?: string
|
||||
|
||||
// Git branch the plugin was built from
|
||||
branch?: string
|
||||
|
||||
// Git hash of the commit the plugin was built from
|
||||
hash?: string
|
||||
"number"?: int64
|
||||
|
||||
// GitHub pull request the plugin was built from
|
||||
pr?: int32
|
||||
}
|
||||
|
||||
// Dependency information related to Grafana and other plugins
|
||||
dependencies: #Dependencies
|
||||
|
||||
#Dependencies: {
|
||||
// (Deprecated) Required Grafana version for this plugin, e.g.
|
||||
// `6.x.x 7.x.x` to denote plugin requires Grafana v6.x.x or
|
||||
// v7.x.x.
|
||||
grafanaVersion?: =~"^([0-9]+)(\\.[0-9x]+)?(\\.[0-9x])?$"
|
||||
|
||||
// Required Grafana version for this plugin. Validated using
|
||||
// https://github.com/npm/node-semver.
|
||||
grafanaDependency: =~"^(<=|>=|<|>|=|~|\\^)?([0-9]+)(\\.[0-9x\\*]+)(\\.[0-9x\\*]+)?(\\s(<=|>=|<|=>)?([0-9]+)(\\.[0-9x]+)(\\.[0-9x]+))?$"
|
||||
|
||||
// An array of required plugins on which this plugin depends
|
||||
plugins?: [...#Dependency]
|
||||
}
|
||||
|
||||
// Dependency describes another plugin on which a plugin depends.
|
||||
// The id refers to the plugin package identifier, as given on
|
||||
// the grafana.com plugin marketplace.
|
||||
#Dependency: {
|
||||
id: =~"^[0-9a-z]+\\-([0-9a-z]+\\-)?(app|panel|datasource)$"
|
||||
type: "app" | "datasource" | "panel"
|
||||
name: string
|
||||
version: string
|
||||
...
|
||||
}
|
||||
|
||||
// Schema definition for the plugin.json file. Used primarily for schema validation.
|
||||
$schema?: string
|
||||
|
||||
// FIXME there appears to be a bug in thema that prevents this from working. Maybe it'd
|
||||
// help to refer to it with an alias, but thema can't support using current list syntax.
|
||||
@@ -194,114 +305,6 @@ seqs: [
|
||||
// in turn inherits them from the Viewer basic role.
|
||||
#BasicRole: "Grafana Admin" | "Admin" | "Editor" | "Viewer"
|
||||
|
||||
// Dependencies needed by the plugin.
|
||||
dependencies: #Dependencies
|
||||
|
||||
#Dependencies: {
|
||||
// (Deprecated) Required Grafana version for this plugin, e.g.
|
||||
// `6.x.x 7.x.x` to denote plugin requires Grafana v6.x.x or
|
||||
// v7.x.x.
|
||||
grafanaVersion?: =~"^([0-9]+)(\\.[0-9x]+)?(\\.[0-9x])?$"
|
||||
|
||||
// Required Grafana version for this plugin. Validated using
|
||||
// https://github.com/npm/node-semver.
|
||||
grafanaDependency: =~"^(<=|>=|<|>|=|~|\\^)?([0-9]+)(\\.[0-9x\\*]+)(\\.[0-9x\\*]+)?(\\s(<=|>=|<|=>)?([0-9]+)(\\.[0-9x]+)(\\.[0-9x]+))?$"
|
||||
|
||||
// An array of required plugins on which this plugin depends.
|
||||
plugins?: [...#Dependency]
|
||||
}
|
||||
|
||||
// Dependency describes another plugin on which a plugin depends.
|
||||
// The id refers to the plugin package identifier, as given on
|
||||
// the grafana.com plugin marketplace.
|
||||
#Dependency: {
|
||||
id: =~"^[0-9a-z]+\\-([0-9a-z]+\\-)?(app|panel|datasource)$"
|
||||
type: "app" | "datasource" | "panel"
|
||||
name: string
|
||||
version: string
|
||||
...
|
||||
}
|
||||
|
||||
// Metadata about the plugin.
|
||||
info: #Info
|
||||
|
||||
// Metadata about a Grafana plugin. Some fields are used on the plugins
|
||||
// page in Grafana and others on grafana.com, if the plugin is published.
|
||||
#Info: {
|
||||
// Information about the plugin author.
|
||||
author?: {
|
||||
// Author's name.
|
||||
name?: string
|
||||
|
||||
// Author's name.
|
||||
email?: string
|
||||
|
||||
// Link to author's website.
|
||||
url?: string
|
||||
}
|
||||
|
||||
// Build information
|
||||
build?: #BuildInfo
|
||||
|
||||
// Description of plugin. Used on the plugins page in Grafana and
|
||||
// for search on grafana.com.
|
||||
description?: string
|
||||
|
||||
// Array of plugin keywords. Used for search on grafana.com.
|
||||
keywords: [...string]
|
||||
// should be this, but CUE to openapi converter screws this up
|
||||
// by inserting a non-concrete default.
|
||||
// keywords: [string, ...string]
|
||||
|
||||
// An array of link objects to be displayed on this plugin's
|
||||
// project page in the form `{name: 'foo', url:
|
||||
// 'http://example.com'}`
|
||||
links?: [...{
|
||||
name?: string
|
||||
url?: string
|
||||
}]
|
||||
|
||||
// SVG images that are used as plugin icons.
|
||||
logos?: {
|
||||
// Link to the "small" version of the plugin logo, which must be
|
||||
// an SVG image. "Large" and "small" logos can be the same image.
|
||||
small: string
|
||||
|
||||
// Link to the "large" version of the plugin logo, which must be
|
||||
// an SVG image. "Large" and "small" logos can be the same image.
|
||||
large: string
|
||||
}
|
||||
|
||||
// An array of screenshot objects in the form `{name: 'bar', path:
|
||||
// 'img/screenshot.png'}`
|
||||
screenshots?: [...{
|
||||
name?: string
|
||||
path?: string
|
||||
}]
|
||||
|
||||
// Date when this plugin was built.
|
||||
updated?: =~"^(\\d{4}-\\d{2}-\\d{2}|\\%TODAY\\%)$"
|
||||
|
||||
// Project version of this commit, e.g. `6.7.x`.
|
||||
version?: =~"^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)|(\\%VERSION\\%)$"
|
||||
}
|
||||
|
||||
#BuildInfo: {
|
||||
// Time when the plugin was built, as a Unix timestamp.
|
||||
time?: int64
|
||||
repo?: string
|
||||
|
||||
// Git branch the plugin was built from.
|
||||
branch?: string
|
||||
|
||||
// Git hash of the commit the plugin was built from
|
||||
hash?: string
|
||||
"number"?: int64
|
||||
|
||||
// GitHub pull request the plugin was built from
|
||||
pr?: int32
|
||||
}
|
||||
|
||||
// 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.
|
||||
|
||||
Reference in New Issue
Block a user