From 6c7e1d0de4dd8f16741e43d87fadb3712447c21d Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Thu, 1 Jun 2017 15:08:52 -0700 Subject: [PATCH 1/2] Fix load localStorage and warning UX on fresh Chronograf install Signed-off-by: Luke Morris --- ui/src/localStorage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ui/src/localStorage.js b/ui/src/localStorage.js index 4ae1e4557c..6c43994e68 100644 --- a/ui/src/localStorage.js +++ b/ui/src/localStorage.js @@ -2,10 +2,10 @@ export const loadLocalStorage = errorsQueue => { try { const serializedState = localStorage.getItem('state') - const state = JSON.parse(serializedState) + const state = JSON.parse(serializedState) || {} // eslint-disable-next-line no-undef - if (state.VERSION !== VERSION) { + if (state.VERSION && state.VERSION !== VERSION) { const errorText = 'New version of Chronograf detected. Local settings cleared.' @@ -18,7 +18,7 @@ export const loadLocalStorage = errorsQueue => { delete state.VERSION - return state || {} + return state } catch (error) { const errorText = `Loading local settings failed: ${error}` From 7bb55526e2e6889bee12f92bc4733d376b9e38fc Mon Sep 17 00:00:00 2001 From: Jared Scheib Date: Thu, 1 Jun 2017 15:10:53 -0700 Subject: [PATCH 2/2] Upbate changebog Signed-off-by: Luke Morris --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02b18f36d8..d88699d991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ 1. [#1535](https://github.com/influxdata/chronograf/pull/1535): Fix add field functions to existing Kapacitor rules 1. [#1564](https://github.com/influxdata/chronograf/pull/1564): Fix regression of logout menu item functionality 1. [#1562](https://github.com/influxdata/chronograf/pull/1562): Fix InfluxQL parsing with multiple tag values for a tag key +1. [#1582](https://github.com/influxdata/chronograf/pull/1582): Fix load localStorage and warning UX on fresh Chronograf install ### Features 1. [#1537](https://github.com/influxdata/chronograf/pull/1537): Add UI for writing data to influxdb.