From 9a30b9970574733bfe763683b4a8ffe46173c802 Mon Sep 17 00:00:00 2001 From: ivaosthu Date: Thu, 24 Oct 2019 16:14:59 +0200 Subject: [PATCH] fix: auto-fill groupId paramters When configuring a gradual-rollout strategy the user has to define the groupId paramter. Usually you just want to set it to the toggle name. This change initalize the value to the toggleName. --- .../component/feature/form/strategy-configure.jsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/feature/form/strategy-configure.jsx b/frontend/src/component/feature/form/strategy-configure.jsx index f62f524f16..73ab30f9a5 100644 --- a/frontend/src/component/feature/form/strategy-configure.jsx +++ b/frontend/src/component/feature/form/strategy-configure.jsx @@ -106,7 +106,12 @@ class StrategyConfigure extends React.Component { /> ); } else { - return this.renderInputFields(strategyDefinition); + return ( +
+
+ {this.renderInputFields(strategyDefinition)} +
+ ); } } @@ -124,6 +129,8 @@ class StrategyConfigure extends React.Component { name={name} onChange={this.handleConfigChange.bind(this, name)} value={1 * value} + minLabel="off" + maxLabel="on" /> {description &&

{description}

} @@ -184,6 +191,9 @@ class StrategyConfigure extends React.Component { ); } else { + if (name === 'groupId' && !value) { + value = this.props.featureToggleName; + } return (