mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 14:22:20 +08:00
FEMT: Add feature toggle and expose the service in regular grafana (#104428)
This commit is contained in:
@ -48,6 +48,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/dashboards"
|
||||
"github.com/grafana/grafana/pkg/services/datasources"
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
"github.com/grafana/grafana/pkg/services/frontend"
|
||||
"github.com/grafana/grafana/pkg/services/org"
|
||||
"github.com/grafana/grafana/pkg/services/pluginsintegration/pluginaccesscontrol"
|
||||
publicdashboardsapi "github.com/grafana/grafana/pkg/services/publicdashboards/api"
|
||||
@ -85,6 +86,14 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
r.Get("/login", hs.LoginView)
|
||||
r.Get("/invite/:code", hs.Index)
|
||||
|
||||
if hs.Features.IsEnabledGlobally(featuremgmt.FlagMultiTenantFrontend) {
|
||||
index, err := frontend.NewIndexProvider(hs.Cfg, hs.License)
|
||||
if err != nil {
|
||||
panic(err) // ???
|
||||
}
|
||||
r.Get("/mtfe", index.HandleRequest)
|
||||
}
|
||||
|
||||
// authed views
|
||||
r.Get("/", reqSignedIn, hs.Index)
|
||||
r.Get("/profile/", reqSignedInNoAnonymous, hs.Index)
|
||||
|
Reference in New Issue
Block a user