mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Feature Toggles: Switch feature toggle admin page over to k8s API (#80854)
* add handling for legacy and k8s apis to frontend * use backend srv directly not redux * add unit test to make sure the correct apis are being called * require api server flag * fix feature toggle name * ensure both pages work correctly * make consistent with legacy api * implement webhook update * fix unit test * remove old apis and update --------- Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
@@ -134,18 +134,7 @@ type FeatureFlag struct {
|
||||
RequiresRestart bool `json:"requiresRestart,omitempty"`
|
||||
}
|
||||
|
||||
type UpdateFeatureTogglesCommand struct {
|
||||
FeatureToggles []FeatureToggleDTO `json:"featureToggles"`
|
||||
}
|
||||
|
||||
type FeatureToggleDTO struct {
|
||||
Name string `json:"name" binding:"Required"`
|
||||
Description string `json:"description"`
|
||||
Enabled bool `json:"enabled"`
|
||||
ReadOnly bool `json:"readOnly,omitempty"`
|
||||
}
|
||||
|
||||
type FeatureManagerState struct {
|
||||
RestartRequired bool `json:"restartRequired"`
|
||||
AllowEditing bool `json:"allowEditing"`
|
||||
type FeatureToggleWebhookPayload struct {
|
||||
FeatureToggles map[string]string `json:"feature_toggles"`
|
||||
User string `json:"user"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user