mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Adds a description field to plugin.json's pages:role field (#62439)
* Adds a description field to plugin.json's pages:role field There's no description of what a page object's "role" setting does. It controls whether a page will appear in the navigation menu for a user with a given role. * Update plugindef.cue with comments to match documentation. * make gen-cue
This commit is contained in:
@@ -79,6 +79,7 @@
|
|||||||
},
|
},
|
||||||
"role": {
|
"role": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"description": "The minimum role a user must have to see this page in the navigation menu.",
|
||||||
"enum": ["Admin", "Editor", "Viewer"]
|
"enum": ["Admin", "Editor", "Viewer"]
|
||||||
},
|
},
|
||||||
"path": {
|
"path": {
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
},
|
},
|
||||||
"addToNav": {
|
"addToNav": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"description": "Add the include to the side menu."
|
"description": "Add the include to the navigation menu."
|
||||||
},
|
},
|
||||||
"defaultNav": {
|
"defaultNav": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
|
|||||||
@@ -99,6 +99,8 @@ seqs: [
|
|||||||
|
|
||||||
// (Legacy) The Angular component to use for a page.
|
// (Legacy) The Angular component to use for a page.
|
||||||
component?: string
|
component?: string
|
||||||
|
|
||||||
|
// The minimum role a user must have to see this page in the navigation menu.
|
||||||
role?: "Admin" | "Editor" | "Viewer"
|
role?: "Admin" | "Editor" | "Viewer"
|
||||||
|
|
||||||
// RBAC action the user must have to access the route
|
// RBAC action the user must have to access the route
|
||||||
@@ -107,7 +109,7 @@ seqs: [
|
|||||||
// Used for app plugins.
|
// Used for app plugins.
|
||||||
path?: string
|
path?: string
|
||||||
|
|
||||||
// Add the include to the side menu.
|
// Add the include to the navigation menu.
|
||||||
addToNav?: bool
|
addToNav?: bool
|
||||||
|
|
||||||
// Page or dashboard when user clicks the icon in the side menu.
|
// Page or dashboard when user clicks the icon in the side menu.
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ type Include struct {
|
|||||||
// RBAC action the user must have to access the route
|
// RBAC action the user must have to access the route
|
||||||
Action *string `json:"action,omitempty"`
|
Action *string `json:"action,omitempty"`
|
||||||
|
|
||||||
// Add the include to the side menu.
|
// Add the include to the navigation menu.
|
||||||
AddToNav *bool `json:"addToNav,omitempty"`
|
AddToNav *bool `json:"addToNav,omitempty"`
|
||||||
|
|
||||||
// (Legacy) The Angular component to use for a page.
|
// (Legacy) The Angular component to use for a page.
|
||||||
@@ -176,7 +176,9 @@ type Include struct {
|
|||||||
Name *string `json:"name,omitempty"`
|
Name *string `json:"name,omitempty"`
|
||||||
|
|
||||||
// Used for app plugins.
|
// Used for app plugins.
|
||||||
Path *string `json:"path,omitempty"`
|
Path *string `json:"path,omitempty"`
|
||||||
|
|
||||||
|
// The minimum role a user must have to see this page in the navigation menu.
|
||||||
Role *IncludeRole `json:"role,omitempty"`
|
Role *IncludeRole `json:"role,omitempty"`
|
||||||
|
|
||||||
// IncludeType is a string identifier of a plugin include type, which is
|
// IncludeType is a string identifier of a plugin include type, which is
|
||||||
@@ -187,7 +189,7 @@ type Include struct {
|
|||||||
Uid *string `json:"uid,omitempty"`
|
Uid *string `json:"uid,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IncludeRole defines model for Include.Role.
|
// The minimum role a user must have to see this page in the navigation menu.
|
||||||
type IncludeRole string
|
type IncludeRole string
|
||||||
|
|
||||||
// IncludeType is a string identifier of a plugin include type, which is
|
// IncludeType is a string identifier of a plugin include type, which is
|
||||||
|
|||||||
Reference in New Issue
Block a user