Chore: Remove global setting var from azure ad oath (#35040)

* Remove global setting var from azure ad oath

* Remove more glob var from social

* Use GrafanaComURL from cfg
This commit is contained in:
idafurjes
2021-06-08 16:08:25 +02:00
committed by GitHub
parent 2cc172db1a
commit 1f5a28ec63
5 changed files with 37 additions and 27 deletions
+4
View File
@@ -385,6 +385,9 @@ type Cfg struct {
// Grafana Live ws endpoint (per Grafana server instance). 0 disables
// Live, -1 means unlimited connections.
LiveMaxConnections int
// Grafana.com URL
GrafanaComURL string
}
// IsLiveConfigEnabled returns true if live should be able to save configs to SQL tables
@@ -940,6 +943,7 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
if GrafanaComUrl == "" {
GrafanaComUrl = valueAsString(iniFile.Section("grafana_com"), "url", "https://grafana.com")
}
cfg.GrafanaComURL = GrafanaComUrl
imageUploadingSection := iniFile.Section("external_image_storage")
cfg.ImageUploadProvider = valueAsString(imageUploadingSection, "provider", "")