accepts spaces in the kapacitor connection name

pull/2752/head
Iris Scholten 2018-02-05 11:58:21 -08:00
parent 058df60e0e
commit 3eeb4514e5
1 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class KapacitorPage extends Component {
const {value, name} = e.target
this.setState(prevState => {
const update = {[name]: value.trim()}
const update = {[name]: value}
return {kapacitor: {...prevState.kapacitor, ...update}}
})
}
@ -70,7 +70,7 @@ class KapacitorPage extends Component {
router,
} = this.props
const {kapacitor} = this.state
kapacitor.name = kapacitor.name.trim()
const isNameTaken = kapacitors.some(k => k.name === kapacitor.name)
const isNew = !params.id