1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00
This commit is contained in:
ivaosthu 2016-10-22 16:48:55 +02:00
parent 38813e5b7e
commit fb2c9538dd
2 changed files with 10 additions and 2 deletions

View File

@ -41,7 +41,14 @@ class ConfigureStrategy extends React.Component {
renderInputFields (selectedStrategy) {
if (selectedStrategy.parametersTemplate) {
return Object.keys(selectedStrategy.parametersTemplate).map(field => (
<Input key={field} name={field} label={field} onChange={this.handleConfigChange.bind(this, field)} />
<Input
type="text"
key={field}
name={field}
label={field}
onChange={this.handleConfigChange.bind(this, field)}
value={this.state.parameters[field]}
/>
));
}
}

View File

@ -11,7 +11,8 @@ class ConfiguredStrategies extends React.Component {
renderName (strategy) {
const params = Object.keys(strategy.parameters)
.map(param => `${param}=${strategy.parameters[param]}`);
.map(param => `${param}='${strategy.parameters[param]}'`)
.join(', ');
return <span>{strategy.name} ({params})</span>;
}