NavTree: Refactor out the navtree building from api/index.go and into it's own service (#55552)

This commit is contained in:
Torkel Ödegaard
2022-09-22 22:04:48 +02:00
committed by GitHub
parent 8863c4c140
commit 09f4068849
20 changed files with 1045 additions and 939 deletions
+2 -1
View File
@@ -27,6 +27,7 @@ import (
"github.com/grafana/grafana/pkg/services/contexthandler/authproxy"
"github.com/grafana/grafana/pkg/services/login/loginservice"
"github.com/grafana/grafana/pkg/services/login/logintest"
"github.com/grafana/grafana/pkg/services/navtree"
"github.com/grafana/grafana/pkg/services/org"
"github.com/grafana/grafana/pkg/services/rendering"
"github.com/grafana/grafana/pkg/services/sqlstore/mockstore"
@@ -118,7 +119,7 @@ func TestMiddlewareContext(t *testing.T) {
data := &dtos.IndexViewData{
User: &dtos.CurrentUser{},
Settings: map[string]interface{}{},
NavTree: []*dtos.NavLink{},
NavTree: []*navtree.NavLink{},
}
t.Log("Calling HTML", "data", data)
c.HTML(http.StatusOK, "index-template", data)