Navigation: refactor RemoveEmptySection... logic into main navtree code (#66878)

refactor RemoveEmptySection logic into main navtree code
This commit is contained in:
Ashley Harrison
2023-04-20 11:10:12 +01:00
committed by GitHub
parent 739c7f1c68
commit 9ff221098d
6 changed files with 73 additions and 190 deletions
+1 -2
View File
@@ -166,8 +166,7 @@ func (hs *HTTPServer) setIndexViewData(c *contextmodel.ReqContext) (*dtos.IndexV
hs.HooksService.RunIndexDataHooks(&data, c)
// This will remove empty cfg or admin sections and move sections around
data.NavTree.RemoveEmptySectionsAndApplyNewInformationArchitecture()
data.NavTree.ApplyAdminIA()
data.NavTree.Sort()
return &data, nil