Initial Baby Step to refactoring settings from global vars to instance (#11777)

* wip: start on refactoring settings

* settings: progress on settings refactor

* refactor: progress on settings refactoring

* fix: fixed failing test

* settings: moved smtp settings from global to instance
This commit is contained in:
Torkel Ödegaard
2018-04-30 16:21:04 +02:00
committed by GitHub
parent fc718b8a9a
commit fa7d7ed5df
28 changed files with 263 additions and 203 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ import (
func AdminGetSettings(c *m.ReqContext) {
settings := make(map[string]interface{})
for _, section := range setting.Cfg.Sections() {
for _, section := range setting.Raw.Sections() {
jsonSec := make(map[string]interface{})
settings[section.Name()] = jsonSec
+3 -2
View File
@@ -35,9 +35,10 @@ type HTTPServer struct {
context context.Context
streamManager *live.StreamManager
cache *gocache.Cache
RouteRegister RouteRegister `inject:""`
httpSrv *http.Server
httpSrv *http.Server
RouteRegister RouteRegister `inject:""`
Bus bus.Bus `inject:""`
}
func (hs *HTTPServer) Init() {