mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Feature Toggles API: Trigger webhook call when updating (#75254)
* Feature Toggles API: Trigger webhook call when updating * update status code error check * lint - handle Close() error * Rename update webhook config * fix tests
This commit is contained in:
@@ -5,10 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type FeatureMgmtSettings struct {
|
||||
HiddenToggles map[string]struct{}
|
||||
ReadOnlyToggles map[string]struct{}
|
||||
AllowEditing bool
|
||||
UpdateControllerUrl string
|
||||
HiddenToggles map[string]struct{}
|
||||
ReadOnlyToggles map[string]struct{}
|
||||
AllowEditing bool
|
||||
UpdateWebhook string
|
||||
UpdateWebhookToken string
|
||||
}
|
||||
|
||||
func (cfg *Cfg) readFeatureManagementConfig() {
|
||||
@@ -32,5 +33,6 @@ func (cfg *Cfg) readFeatureManagementConfig() {
|
||||
cfg.FeatureManagement.HiddenToggles = hiddenToggles
|
||||
cfg.FeatureManagement.ReadOnlyToggles = readOnlyToggles
|
||||
cfg.FeatureManagement.AllowEditing = cfg.SectionWithEnvOverrides("feature_management").Key("allow_editing").MustBool(false)
|
||||
cfg.FeatureManagement.UpdateControllerUrl = cfg.SectionWithEnvOverrides("feature_management").Key("update_controller_url").MustString("")
|
||||
cfg.FeatureManagement.UpdateWebhook = cfg.SectionWithEnvOverrides("feature_management").Key("update_webhook").MustString("")
|
||||
cfg.FeatureManagement.UpdateWebhookToken = cfg.SectionWithEnvOverrides("feature_management").Key("update_webhook_token").MustString("")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user