|
|
|
@ -40,6 +40,7 @@ import ( |
|
|
|
|
"github.com/grafana/grafana/pkg/services/datasources" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/datasources/permissions" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/encryption" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/entityevents" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/featuremgmt" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/hooks" |
|
|
|
|
"github.com/grafana/grafana/pkg/services/ldap" |
|
|
|
@ -149,6 +150,7 @@ type HTTPServer struct { |
|
|
|
|
DashboardsnapshotsService *dashboardsnapshots.Service |
|
|
|
|
PluginSettings *pluginSettings.Service |
|
|
|
|
AvatarCacheServer *avatar.AvatarCacheServer |
|
|
|
|
entityEventsService entityevents.Service |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type ServerOptions struct { |
|
|
|
@ -180,7 +182,7 @@ func ProvideHTTPServer(opts ServerOptions, cfg *setting.Cfg, routeRegister routi |
|
|
|
|
dashboardProvisioningService dashboards.DashboardProvisioningService, folderService dashboards.FolderService, |
|
|
|
|
datasourcePermissionsService permissions.DatasourcePermissionsService, alertNotificationService *alerting.AlertNotificationService, |
|
|
|
|
dashboardsnapshotsService *dashboardsnapshots.Service, commentsService *comments.Service, pluginSettings *pluginSettings.Service, |
|
|
|
|
avatarCacheServer *avatar.AvatarCacheServer, |
|
|
|
|
avatarCacheServer *avatar.AvatarCacheServer, entityEventsService entityevents.Service, |
|
|
|
|
) (*HTTPServer, error) { |
|
|
|
|
web.Env = cfg.Env |
|
|
|
|
m := web.New() |
|
|
|
@ -254,6 +256,7 @@ func ProvideHTTPServer(opts ServerOptions, cfg *setting.Cfg, routeRegister routi |
|
|
|
|
PluginSettings: pluginSettings, |
|
|
|
|
permissionServices: permissionsServices, |
|
|
|
|
AvatarCacheServer: avatarCacheServer, |
|
|
|
|
entityEventsService: entityEventsService, |
|
|
|
|
} |
|
|
|
|
if hs.Listener != nil { |
|
|
|
|
hs.log.Debug("Using provided listener") |
|
|
|
|