1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-01 00:08:27 +01:00

minor fix

This commit is contained in:
ivaosthu 2016-10-25 22:33:23 +02:00
parent e39e319ed4
commit 42c8d2ecd8
2 changed files with 14 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import { connect } from 'react-redux';
import { hashHistory } from 'react-router';
import { browserHistory } from 'react-router';
import { createFeatureToggles } from '../../store/feature-actions';
@ -21,7 +21,7 @@ const prepare = (methods, dispatch) => {
methods.onCancel = (evt) => {
evt.preventDefault();
hashHistory.push('/features');
browserHistory.push('/features');
};
methods.addStrategy = (v) => {

View File

@ -35,6 +35,8 @@ class ConfigureStrategies extends React.Component {
}
renderInputFields (strategyDefinition) {
if (strategyDefinition.parametersTemplate) {
return Object.keys(strategyDefinition.parametersTemplate).map(field => (
<Input
@ -50,7 +52,17 @@ class ConfigureStrategies extends React.Component {
}
render () {
if (!this.props.strategyDefinition) {
return (
<div>
<span style={{ color: 'red' }}>Strategy "{this.props.strategy.name}" deleted</span>
<Button title="Remove Strategy" onClick={this.handleRemove} icon="remove" floating accent mini />
</div>
)
}
const inputFields = this.renderInputFields(this.props.strategyDefinition);
return (
<div>
<strong>{this.props.strategy.name}</strong>