mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Schemas: Add description to kinds metadata (#62638)
* add description to kinds * omit empty
This commit is contained in:
@@ -2,8 +2,9 @@ package kind
|
|||||||
|
|
||||||
import "strings"
|
import "strings"
|
||||||
|
|
||||||
name: "Dashboard"
|
name: "Dashboard"
|
||||||
maturity: "experimental"
|
maturity: "experimental"
|
||||||
|
description: "A Grafana dashboard."
|
||||||
|
|
||||||
lineage: seqs: [
|
lineage: seqs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,9 @@ package kind
|
|||||||
|
|
||||||
import "strings"
|
import "strings"
|
||||||
|
|
||||||
name: "LibraryPanel"
|
name: "LibraryPanel"
|
||||||
maturity: "experimental"
|
maturity: "experimental"
|
||||||
|
description: "A standalone panel"
|
||||||
|
|
||||||
lineage: seqs: [
|
lineage: seqs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package kind
|
package kind
|
||||||
|
|
||||||
name: "Playlist"
|
name: "Playlist"
|
||||||
maturity: "merged"
|
maturity: "merged"
|
||||||
|
description: "A playlist is a series of dashboards that is automatically rotated in the browser, on a configurable interval."
|
||||||
|
|
||||||
lineage: seqs: [
|
lineage: seqs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package kind
|
package kind
|
||||||
|
|
||||||
name: "Preferences"
|
name: "Preferences"
|
||||||
maturity: "merged"
|
maturity: "merged"
|
||||||
|
description: "The user or team frontend preferences"
|
||||||
|
|
||||||
lineage: seqs: [
|
lineage: seqs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package kind
|
package kind
|
||||||
|
|
||||||
name: "PublicDashboard"
|
name: "PublicDashboard"
|
||||||
maturity: "merged"
|
maturity: "merged"
|
||||||
|
description: "Public dashboard configuration"
|
||||||
|
|
||||||
lineage: seqs: [
|
lineage: seqs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package kind
|
package kind
|
||||||
|
|
||||||
name: "ServiceAccount"
|
name: "ServiceAccount"
|
||||||
maturity: "merged"
|
maturity: "merged"
|
||||||
|
description: "system account"
|
||||||
|
|
||||||
lineage: seqs: [
|
lineage: seqs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package kind
|
package kind
|
||||||
|
|
||||||
name: "Team"
|
name: "Team"
|
||||||
maturity: "merged"
|
maturity: "merged"
|
||||||
|
description: "A team is a named grouping of Grafana users to which access control rules may be assigned."
|
||||||
|
|
||||||
lineage: seqs: [
|
lineage: seqs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -79,6 +79,14 @@ _sharedKind: {
|
|||||||
maturity: *"merged" | "experimental"
|
maturity: *"merged" | "experimental"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// properties shared by all kinds that represent a complete object from root (i.e., not composable)
|
||||||
|
_rootKind: {
|
||||||
|
// description is a brief narrative description of the nature and purpose of the kind.
|
||||||
|
// The contents of this field is shown to end users. Prefer clear, concise wording
|
||||||
|
// with minimal jargon.
|
||||||
|
description: nonEmptyString
|
||||||
|
}
|
||||||
|
|
||||||
// Maturity indicates the how far a given kind definition is in its initial
|
// Maturity indicates the how far a given kind definition is in its initial
|
||||||
// journey. Mature kinds still evolve, but with guarantees about compatibility.
|
// journey. Mature kinds still evolve, but with guarantees about compatibility.
|
||||||
Maturity: "merged" | "experimental" | "stable" | "mature"
|
Maturity: "merged" | "experimental" | "stable" | "mature"
|
||||||
@@ -88,7 +96,10 @@ Maturity: "merged" | "experimental" | "stable" | "mature"
|
|||||||
// and datasources, are represented as core kinds.
|
// and datasources, are represented as core kinds.
|
||||||
Core: S=close({
|
Core: S=close({
|
||||||
_sharedKind
|
_sharedKind
|
||||||
|
_rootKind
|
||||||
|
|
||||||
lineage: { name: S.machineName }
|
lineage: { name: S.machineName }
|
||||||
lineageIsGroup: false
|
lineageIsGroup: false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
nonEmptyString: string & strings.MinRunes(1)
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ type CommonProperties struct {
|
|||||||
PluralMachineName string `json:"pluralMachineName"`
|
PluralMachineName string `json:"pluralMachineName"`
|
||||||
LineageIsGroup bool `json:"lineageIsGroup"`
|
LineageIsGroup bool `json:"lineageIsGroup"`
|
||||||
Maturity Maturity `json:"maturity"`
|
Maturity Maturity `json:"maturity"`
|
||||||
|
Description string `json:"description,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// CoreProperties represents the static properties in the definition of a
|
// CoreProperties represents the static properties in the definition of a
|
||||||
|
|||||||
@@ -283,6 +283,7 @@
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
|
"description": "A Grafana dashboard.",
|
||||||
"grafanaMaturityCount": 139,
|
"grafanaMaturityCount": 139,
|
||||||
"lineageIsGroup": false,
|
"lineageIsGroup": false,
|
||||||
"links": {
|
"links": {
|
||||||
@@ -819,6 +820,7 @@
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
|
"description": "A standalone panel",
|
||||||
"grafanaMaturityCount": 10,
|
"grafanaMaturityCount": 10,
|
||||||
"lineageIsGroup": false,
|
"lineageIsGroup": false,
|
||||||
"links": {
|
"links": {
|
||||||
@@ -1181,6 +1183,7 @@
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
|
"description": "A playlist is a series of dashboards that is automatically rotated in the browser, on a configurable interval.",
|
||||||
"grafanaMaturityCount": 0,
|
"grafanaMaturityCount": 0,
|
||||||
"lineageIsGroup": false,
|
"lineageIsGroup": false,
|
||||||
"links": {
|
"links": {
|
||||||
@@ -1251,6 +1254,7 @@
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
|
"description": "The user or team frontend preferences",
|
||||||
"grafanaMaturityCount": 0,
|
"grafanaMaturityCount": 0,
|
||||||
"lineageIsGroup": false,
|
"lineageIsGroup": false,
|
||||||
"links": {
|
"links": {
|
||||||
@@ -1321,6 +1325,7 @@
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
|
"description": "Public dashboard configuration",
|
||||||
"grafanaMaturityCount": 0,
|
"grafanaMaturityCount": 0,
|
||||||
"lineageIsGroup": false,
|
"lineageIsGroup": false,
|
||||||
"links": {
|
"links": {
|
||||||
@@ -1389,6 +1394,7 @@
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
|
"description": "system account",
|
||||||
"grafanaMaturityCount": 9,
|
"grafanaMaturityCount": 9,
|
||||||
"lineageIsGroup": false,
|
"lineageIsGroup": false,
|
||||||
"links": {
|
"links": {
|
||||||
@@ -1509,6 +1515,7 @@
|
|||||||
0,
|
0,
|
||||||
0
|
0
|
||||||
],
|
],
|
||||||
|
"description": "A team is a named grouping of Grafana users to which access control rules may be assigned.",
|
||||||
"grafanaMaturityCount": 7,
|
"grafanaMaturityCount": 7,
|
||||||
"lineageIsGroup": false,
|
"lineageIsGroup": false,
|
||||||
"links": {
|
"links": {
|
||||||
|
|||||||
Reference in New Issue
Block a user