mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 04:22:13 +08:00
Pick changes from PR 33811, use UID in dashboard navlinks (#36899)
* pick changes from PR 33811, use UID in dashboard navlinks * use proper spelling for UID * add uid to the plugin schema * Update docs/sources/developers/plugins/plugin.schema.json Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
This commit is contained in:
@ -95,10 +95,19 @@ type PluginInclude struct {
|
||||
DefaultNav bool `json:"defaultNav"`
|
||||
Slug string `json:"slug"`
|
||||
Icon string `json:"icon"`
|
||||
UID string `json:"uid"`
|
||||
|
||||
Id string `json:"-"`
|
||||
}
|
||||
|
||||
func (e PluginInclude) GetSlugOrUIDLink() string {
|
||||
if len(e.UID) > 0 {
|
||||
return "/d/" + e.UID
|
||||
} else {
|
||||
return "/dashboard/db/" + e.Slug
|
||||
}
|
||||
}
|
||||
|
||||
type PluginDependencyItem struct {
|
||||
Type string `json:"type"`
|
||||
Id string `json:"id"`
|
||||
|
Reference in New Issue
Block a user