From 0e88f5db85fd7457e99aff178473aa4b1887febf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Mon, 13 Dec 2021 14:06:15 +0100 Subject: [PATCH] AppPlugins: Support app plugins with only default nav (#43016) --- pkg/api/index.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/api/index.go b/pkg/api/index.go index 3872a83b7e1..31f7e3a5e8d 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -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) } }