Transformers: configure result transformations after query(alpha) (#18740)

This commit is contained in:
Ryan McKinley
2019-09-09 08:58:57 +02:00
committed by Dominik Prokop
parent 205c0a58ac
commit 7d32caeac2
35 changed files with 811 additions and 96 deletions
+13
View File
@@ -266,6 +266,8 @@ type Cfg struct {
EditorsCanAdmin bool
ApiKeyMaxSecondsToLive int64
FeatureToggles map[string]bool
}
type CommandLineArgs struct {
@@ -941,6 +943,17 @@ func (cfg *Cfg) Load(args *CommandLineArgs) error {
cfg.PluginsEnableAlpha = pluginsSection.Key("enable_alpha").MustBool(false)
cfg.PluginsAppsSkipVerifyTLS = pluginsSection.Key("app_tls_skip_verify_insecure").MustBool(false)
// Read and populate feature toggles list
featureTogglesSection := iniFile.Section("feature_toggles")
cfg.FeatureToggles = make(map[string]bool)
featuresTogglesStr, err := valueAsString(featureTogglesSection, "enable", "")
if err != nil {
return err
}
for _, feature := range util.SplitString(featuresTogglesStr) {
cfg.FeatureToggles[feature] = true
}
// check old location for this option
if panelsSection.Key("enable_alpha").MustBool(false) {
cfg.PluginsEnableAlpha = true