mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
only render direct children on the landing page routes (#56720)
This commit is contained in:
@@ -115,8 +115,7 @@ func (root *NavTreeRoot) RemoveEmptySectionsAndApplyNewInformationArchitecture(t
|
||||
}
|
||||
|
||||
if serverAdminNode := root.FindById(NavIDAdmin); serverAdminNode != nil {
|
||||
serverAdminNode.Url = "/admin/settings"
|
||||
serverAdminNode.Text = "Server admin"
|
||||
serverAdminNode.Url = "/admin/server"
|
||||
serverAdminNode.SortWeight = 0
|
||||
|
||||
if orgAdminNode != nil {
|
||||
|
||||
@@ -171,7 +171,11 @@ func (s *ServiceImpl) getServerAdminNode(c *models.ReqContext) *navtree.NavLink
|
||||
}
|
||||
|
||||
if len(adminNavLinks) > 0 {
|
||||
adminNode.Url = adminNavLinks[0].Url
|
||||
if s.cfg.IsFeatureToggleEnabled(featuremgmt.FlagTopnav) {
|
||||
adminNode.Url = s.cfg.AppSubURL + "/admin/server"
|
||||
} else {
|
||||
adminNode.Url = adminNavLinks[0].Url
|
||||
}
|
||||
}
|
||||
|
||||
return adminNode
|
||||
|
||||
Reference in New Issue
Block a user