Correct default rule id name

pull/10616/head
deniz kusefoglu 2018-01-04 15:47:32 -08:00
parent 6d62350400
commit 510882bb7f
1 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ import FancyScrollbar from 'shared/components/FancyScrollbar'
import {createRule, editRule} from 'src/kapacitor/apis'
import buildInfluxQLQuery from 'utils/influxql'
import timeRanges from 'hson!shared/data/timeRanges.hson'
import {DEFAULT_RULE_ID} from 'src/kapacitor/constants'
class KapacitorRule extends Component {
constructor(props) {
@ -88,7 +89,7 @@ class KapacitorRule extends Component {
})
if (this.validationError()) {
router.push(configLink)
} else if (rule.id === 'new') {
} else if (rule.id === DEFAULT_RULE_ID) {
const newRule = Object.assign({}, rule, {
query: queryConfigs[rule.queryID],
})