Merge pull request #2752 from influxdata/kapacitor-spaces

Kapacitor page allows users to add spaces to kapacitor name
pull/2757/head^2
ischolten 2018-02-06 14:32:10 -08:00 committed by GitHub
commit 58a124bf4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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