Merge pull request #2563 from influxdata/bugfix/y-axis-undefined
y axis title undefinedpull/2580/head
commit
3a953d99bc
|
@ -3,7 +3,7 @@
|
||||||
### UI Improvements
|
### UI Improvements
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
1. [#2528](https://github.com/influxdata/chronograf/pull/2528): Fix template rendering to ignore template if not in query
|
1. [#2528](https://github.com/influxdata/chronograf/pull/2528): Fix template rendering to ignore template if not in query
|
||||||
1. [#2554](https://github.com/influxdata/chronograf/pull/2554): Fix graph inversion if a user supplies a min y-bound > max y-bound
|
1. [#2563](https://github.com/influxdata/chronograf/pull/2563): Fix graph inversion if user input y-axis min greater than max
|
||||||
|
|
||||||
## v1.4.0.0-beta1 [2017-12-07]
|
## v1.4.0.0-beta1 [2017-12-07]
|
||||||
### Features
|
### Features
|
||||||
|
|
|
@ -258,5 +258,12 @@ describe('Presenters', () => {
|
||||||
|
|
||||||
expect(actual).to.equal('m1.derivative_mean_usage_system')
|
expect(actual).to.equal('m1.derivative_mean_usage_system')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('returns a label of empty string if the query config is empty', () => {
|
||||||
|
const query = defaultQueryConfig({id: 1})
|
||||||
|
const actual = buildDefaultYLabel(query)
|
||||||
|
|
||||||
|
expect(actual).to.equal('')
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
|
@ -40,7 +40,7 @@ const AxesOptions = ({
|
||||||
<div className="form-group col-sm-12">
|
<div className="form-group col-sm-12">
|
||||||
<label htmlFor="prefix">Title</label>
|
<label htmlFor="prefix">Title</label>
|
||||||
<OptIn
|
<OptIn
|
||||||
customPlaceholder={defaultYLabel}
|
customPlaceholder={defaultYLabel || 'y-axis title'}
|
||||||
customValue={label}
|
customValue={label}
|
||||||
onSetValue={onSetLabel}
|
onSetValue={onSetLabel}
|
||||||
type="text"
|
type="text"
|
||||||
|
|
|
@ -114,6 +114,11 @@ function getRolesForUser(roles, user) {
|
||||||
export const buildDefaultYLabel = queryConfig => {
|
export const buildDefaultYLabel = queryConfig => {
|
||||||
const {measurement} = queryConfig
|
const {measurement} = queryConfig
|
||||||
const fields = _.get(queryConfig, ['fields', '0'], [])
|
const fields = _.get(queryConfig, ['fields', '0'], [])
|
||||||
|
const isEmpty = !measurement && !fields.length
|
||||||
|
|
||||||
|
if (isEmpty) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
const walkZerothArgs = f => {
|
const walkZerothArgs = f => {
|
||||||
if (f.type === 'field') {
|
if (f.type === 'field') {
|
||||||
|
|
Loading…
Reference in New Issue