AppPlugins: Support app plugins with only default nav (#43016) (#43028)

(cherry picked from commit 0e88f5db85)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
This commit is contained in:
Grot (@grafanabot)
2021-12-13 14:22:53 +01:00
committed by GitHub
co-authored by Torkel Ödegaard
parent ce66af2cbd
commit 3ac0aaae80
+4
View File
@@ -126,6 +126,10 @@ func (hs *HTTPServer) getAppLinks(c *models.ReqContext) ([]*dtos.NavLink, error)
}
if len(appLink.Children) > 0 {
// If we only have one child and it's the app default nav then remove it from children
if len(appLink.Children) == 1 && appLink.Children[0].Url == appLink.Url {
appLink.Children = []*dtos.NavLink{}
}
appLinks = append(appLinks, appLink)
}
}