Merge pull request #1688 from influxdata/bugfix/tr-fix-rp-update

Fix RP duration editing on admin page
pull/10616/head
Timothy J. Raymond 2017-07-05 15:06:11 -04:00 committed by GitHub
commit ff76a9831d
2 changed files with 10 additions and 3 deletions

View File

@ -2,6 +2,7 @@
### Bug Fixes
1. [#1612](https://github.com/influxdata/chronograf/pull/1612): Prevent users from being able to write to internal system databases
1. [#1655](https://github.com/influxdata/chronograf/pull/1655): Add more than one color to Line+Stat graphs
1. [#1688](https://github.com/influxdata/chronograf/pull/1688): Fix updating retention policies on single-node instances.
### Features
1. [#1645](https://github.com/influxdata/chronograf/pull/1645): Add Auth0 as a supported OAuth2 provider

View File

@ -225,12 +225,18 @@ class DatabaseRow extends Component {
}
getInputValues() {
const {notify, retentionPolicy: {name: currentName}} = this.props
const {
notify,
retentionPolicy: {name: currentName},
isRFDisplayed,
} = this.props
const name = (this.name && this.name.value.trim()) || currentName
let duration = this.duration.value.trim()
const replication = +this.replication.value.trim()
// Replication > 1 is only valid for Influx Enterprise
const replication = isRFDisplayed ? +this.replication.value.trim() : 1
if (!duration || !replication) {
if (!duration || (isRFDisplayed && !replication)) {
notify('error', 'Fields cannot be empty')
return
}