mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
App Plugins: support react pages in nav (#22428)
This commit is contained in:
parent
2b6a88bf59
commit
0606555ba1
@ -230,9 +230,20 @@ func (hs *HTTPServer) setIndexViewData(c *m.ReqContext) (*dtos.IndexViewData, er
|
||||
}
|
||||
|
||||
if include.Type == "page" && include.AddToNav {
|
||||
link := &dtos.NavLink{
|
||||
Url: setting.AppSubUrl + "/plugins/" + plugin.Id + "/page/" + include.Slug,
|
||||
Text: include.Name,
|
||||
var link *dtos.NavLink
|
||||
if len(include.Path) > 0 {
|
||||
link = &dtos.NavLink{
|
||||
Url: setting.AppSubUrl + include.Path,
|
||||
Text: include.Name,
|
||||
}
|
||||
if include.DefaultNav {
|
||||
appLink.Url = link.Url // Overwrite the hardcoded page logic
|
||||
}
|
||||
} else {
|
||||
link = &dtos.NavLink{
|
||||
Url: setting.AppSubUrl + "/plugins/" + plugin.Id + "/page/" + include.Slug,
|
||||
Text: include.Name,
|
||||
}
|
||||
}
|
||||
appLink.Children = append(appLink.Children, link)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user