Merge pull request #3094 from influxdata/fix/ensure-template-variables-save

Ensure that template variables always save
pull/10616/head
Brandon Farmer 2018-03-29 15:59:45 -07:00 committed by GitHub
commit 0409967dfc
2 changed files with 11 additions and 4 deletions

View File

@ -1,11 +1,15 @@
## v1.5.0.0 [unreleased]
### Features
1. [#2526](https://github.com/influxdata/chronograf/pull/2526): Add support for RS256/JWKS verification, support for id_token parsing (as in ADFS)
### UI Improvements
### Bug Fixes
1. [#2950](https://github.com/influxdata/chronograf/pull/2094): Always save template variables on first edit
## v1.4.3.0 [unreleased]
### UI Improvements

View File

@ -201,10 +201,13 @@ export const getDashboardsAsync = () => async dispatch => {
const removeUnselectedTemplateValues = dashboard => {
const templates = dashboard.templates.map(template => {
const values =
template.type === 'csv'
? template.values
: [template.values.find(val => val.selected)] || []
if (template.type === 'csv') {
return template
}
const value = template.values.find(val => val.selected)
const values = value ? [value] : []
return {...template, values}
})
return templates