mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
minor fix
This commit is contained in:
parent
e39e319ed4
commit
42c8d2ecd8
@ -1,5 +1,5 @@
|
|||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { hashHistory } from 'react-router';
|
import { browserHistory } from 'react-router';
|
||||||
|
|
||||||
|
|
||||||
import { createFeatureToggles } from '../../store/feature-actions';
|
import { createFeatureToggles } from '../../store/feature-actions';
|
||||||
@ -21,7 +21,7 @@ const prepare = (methods, dispatch) => {
|
|||||||
|
|
||||||
methods.onCancel = (evt) => {
|
methods.onCancel = (evt) => {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
hashHistory.push('/features');
|
browserHistory.push('/features');
|
||||||
};
|
};
|
||||||
|
|
||||||
methods.addStrategy = (v) => {
|
methods.addStrategy = (v) => {
|
||||||
|
@ -35,6 +35,8 @@ class ConfigureStrategies extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderInputFields (strategyDefinition) {
|
renderInputFields (strategyDefinition) {
|
||||||
|
|
||||||
|
|
||||||
if (strategyDefinition.parametersTemplate) {
|
if (strategyDefinition.parametersTemplate) {
|
||||||
return Object.keys(strategyDefinition.parametersTemplate).map(field => (
|
return Object.keys(strategyDefinition.parametersTemplate).map(field => (
|
||||||
<Input
|
<Input
|
||||||
@ -50,7 +52,17 @@ class ConfigureStrategies extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
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);
|
const inputFields = this.renderInputFields(this.props.strategyDefinition);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<strong>{this.props.strategy.name}</strong>
|
<strong>{this.props.strategy.name}</strong>
|
||||||
|
Loading…
Reference in New Issue
Block a user