Merge pull request #2019 from influxdata/bugfix/dup-kapa-name-error-misfire
BUGFIX: Fix improper banner error for duplicate kapacitor namepull/10616/head
commit
d66730b5c5
|
@ -1,8 +1,10 @@
|
|||
## v1.3.9.0 [unreleased]
|
||||
### Bug Fixes
|
||||
1.[#2004](https://github.com/influxdata/chronograf/pull/2004): Fix DE query templates dropdown disappearance.
|
||||
1.[#2004](https://github.com/influxdata/chronograf/pull/2004): Fix DE query templates dropdown disappearance
|
||||
1.[#2006](https://github.com/influxdata/chronograf/pull/2006): Fix no alert for duplicate db name
|
||||
1.[#2019](https://github.com/influxdata/chronograf/pull/2006): Fix false error warning for duplicate kapacitor name
|
||||
1.[#2018](https://github.com/influxdata/chronograf/pull/2018): Fix unresponsive display options and query builder in dashboards
|
||||
|
||||
### Features
|
||||
1. [#1885](https://github.com/influxdata/chronograf/pull/1885): Add `fill` options to data explorer and dashboard queries
|
||||
1. [#1978](https://github.com/influxdata/chronograf/pull/1978): Support editing kapacitor TICKScript
|
||||
|
|
|
@ -24,12 +24,6 @@ class KapacitorPage extends Component {
|
|||
},
|
||||
exists: false,
|
||||
}
|
||||
|
||||
this.handleInputChange = ::this.handleInputChange
|
||||
this.handleSubmit = ::this.handleSubmit
|
||||
this.handleResetToDefaults = ::this.handleResetToDefaults
|
||||
this._parseKapacitorURL = ::this._parseKapacitorURL
|
||||
this.checkKapacitorConnection = ::this.checkKapacitorConnection
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
@ -44,7 +38,7 @@ class KapacitorPage extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
async checkKapacitorConnection(kapacitor) {
|
||||
checkKapacitorConnection = async kapacitor => {
|
||||
try {
|
||||
await pingKapacitor(kapacitor)
|
||||
this.setState({exists: true})
|
||||
|
@ -57,7 +51,7 @@ class KapacitorPage extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
handleInputChange(e) {
|
||||
handleInputChange = e => {
|
||||
const {value, name} = e.target
|
||||
|
||||
this.setState(prevState => {
|
||||
|
@ -66,7 +60,7 @@ class KapacitorPage extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
handleSubmit(e) {
|
||||
handleSubmit = e => {
|
||||
e.preventDefault()
|
||||
const {
|
||||
addFlashMessage,
|
||||
|
@ -78,8 +72,9 @@ class KapacitorPage extends Component {
|
|||
const {kapacitor} = this.state
|
||||
|
||||
const isNameTaken = kapacitors.some(k => k.name === kapacitor.name)
|
||||
const isNew = !params.id
|
||||
|
||||
if (isNameTaken) {
|
||||
if (isNew && isNameTaken) {
|
||||
addFlashMessage({
|
||||
type: 'error',
|
||||
text: `There is already a Kapacitor configuration named "${kapacitor.name}"`,
|
||||
|
@ -121,7 +116,7 @@ class KapacitorPage extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
handleResetToDefaults(e) {
|
||||
handleResetToDefaults = e => {
|
||||
e.preventDefault()
|
||||
const defaultState = {
|
||||
url: this._parseKapacitorURL(),
|
||||
|
@ -133,7 +128,7 @@ class KapacitorPage extends Component {
|
|||
this.setState({kapacitor: {...defaultState}})
|
||||
}
|
||||
|
||||
_parseKapacitorURL() {
|
||||
_parseKapacitorURL = () => {
|
||||
const parser = document.createElement('a')
|
||||
parser.href = this.props.source.url
|
||||
|
||||
|
|
Loading…
Reference in New Issue