[sql-lab] performance updates - make ui more responsive (#2469)

* remove network status feature

* only fetch queries if there are started or running queries

* don't use local storage

* remove last network status from actions

* don't remove support for local storage

* address pr comments and linting

* use .some rather than .forEach
This commit is contained in:
Alanna Scott
2017-03-27 12:46:36 -07:00
committed by GitHub
parent 75e7f2d22c
commit 43dd948476
7 changed files with 21 additions and 45 deletions

View File

@@ -17,7 +17,6 @@ export function getInitialState(defaultDbId) {
return {
alerts: [],
networkOn: true,
queries: {},
databases: {},
queryEditors: [defaultQueryEditor],
@@ -230,12 +229,6 @@ export const sqlLabReducer = function (state, action) {
[actions.REMOVE_ALERT]() {
return removeFromArr(state, 'alerts', action.alert);
},
[actions.SET_NETWORK_STATUS]() {
if (state.networkOn !== action.networkOn) {
return Object.assign({}, state, { networkOn: action.networkOn });
}
return state;
},
[actions.REFRESH_QUERIES]() {
let newQueries = Object.assign({}, state.queries);
// Fetch the updates to the queries present in the store.