mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 11:44:06 +08:00
Plugins: Fix Default Nav URL for dashboard includes (#47143)
* Plugins: Fix Default Nav URL for dashboard includes * update nav links * PR comments
This commit is contained in:
@ -97,12 +97,11 @@ type Includes struct {
|
||||
ID string `json:"-"`
|
||||
}
|
||||
|
||||
func (e Includes) GetSlugOrUIDLink() string {
|
||||
if len(e.UID) > 0 {
|
||||
return "/d/" + e.UID
|
||||
} else {
|
||||
return "/dashboard/db/" + e.Slug
|
||||
func (e Includes) DashboardURLPath() string {
|
||||
if e.Type != "dashboard" || len(e.UID) == 0 {
|
||||
return ""
|
||||
}
|
||||
return "/d/" + e.UID
|
||||
}
|
||||
|
||||
type Dependency struct {
|
||||
|
Reference in New Issue
Block a user