mirror of
https://github.com/apache/superset.git
synced 2026-04-21 09:04:38 +00:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user