diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d930ec4be..a7f1e95ddf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## v1.3.11.0 [unreleased] ### Bug Fixes +1. [#2158](https://github.com/influxdata/chronograf/pull/2158): Fix 'Cannot connect to source' false error flag on Dashboard page 1. [#2167](https://github.com/influxdata/chronograf/pull/2167): Add fractions of seconds to time field in csv export + ### Features ### UI Improvements diff --git a/ui/src/dashboards/actions/index.js b/ui/src/dashboards/actions/index.js index b151b5e19e..0108e3ab96 100644 --- a/ui/src/dashboards/actions/index.js +++ b/ui/src/dashboards/actions/index.js @@ -281,7 +281,8 @@ export const updateTempVarValues = (source, dashboard) => async dispatch => { results.forEach(({data}, i) => { const {type, query, id} = tempsWithQueries[i] - const vals = parsers[type](data, query.tagKey || query.measurement)[type] + const parsed = parsers[type](data, query.tagKey || query.measurement) + const vals = parsed[type] dispatch(editTemplateVariableValues(dashboard.id, id, vals)) }) } catch (error) { diff --git a/ui/src/shared/parsing/index.js b/ui/src/shared/parsing/index.js index 7ac11b03bf..5ea98db42a 100644 --- a/ui/src/shared/parsing/index.js +++ b/ui/src/shared/parsing/index.js @@ -1,3 +1,4 @@ +import _ from 'lodash' import databases from 'shared/parsing/showDatabases' import measurements from 'shared/parsing/showMeasurements' import fieldKeys from 'shared/parsing/showFieldKeys' @@ -8,16 +9,19 @@ const parsers = { databases, measurements: data => { const {errors, measurementSets} = measurements(data) - return {errors, measurements: measurementSets[0].measurements} + return { + errors, + measurements: _.get(measurementSets, ['0', 'measurements'], []), + } }, fieldKeys: (data, key) => { const {errors, fieldSets} = fieldKeys(data) - return {errors, fieldKeys: fieldSets[key]} + return {errors, fieldKeys: _.get(fieldSets, key, [])} }, tagKeys, tagValues: (data, key) => { const {errors, tags} = tagValues(data) - return {errors, tagValues: tags[key]} + return {errors, tagValues: _.get(tags, key, [])} }, }