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:
+7
-4
@@ -120,11 +120,14 @@ func (hs *HTTPServer) getAppLinks(c *models.ReqContext) ([]*dtos.NavLink, error)
|
||||
}
|
||||
|
||||
if include.Type == "dashboard" && include.AddToNav {
|
||||
link := &dtos.NavLink{
|
||||
Url: hs.Cfg.AppSubURL + include.GetSlugOrUIDLink(),
|
||||
Text: include.Name,
|
||||
dboardURL := include.DashboardURLPath()
|
||||
if dboardURL != "" {
|
||||
link := &dtos.NavLink{
|
||||
Url: path.Join(hs.Cfg.AppSubURL, dboardURL),
|
||||
Text: include.Name,
|
||||
}
|
||||
appLink.Children = append(appLink.Children, link)
|
||||
}
|
||||
appLink.Children = append(appLink.Children, link)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user