mirror of
https://github.com/apache/superset.git
synced 2026-04-24 02:25:13 +00:00
apply redux for VisualizeModal (#2795)
* redux visualize modal * redux visualize modal - apply redux - add unit test for connect container component - fix lint error * redux visualize modal - apply redux - add unit test for connect container component - fix lint error
This commit is contained in:
@@ -251,6 +251,25 @@ export const sqlLabReducer = function (state, action) {
|
||||
}
|
||||
return Object.assign({}, state, { queries: newQueries, queriesLastUpdate });
|
||||
},
|
||||
[actions.CREATE_DATASOURCE_STARTED]() {
|
||||
return Object.assign({}, state, {
|
||||
isDatasourceLoading: true,
|
||||
errorMessage: null,
|
||||
});
|
||||
},
|
||||
[actions.CREATE_DATASOURCE_SUCCESS]() {
|
||||
return Object.assign({}, state, {
|
||||
isDatasourceLoading: false,
|
||||
errorMessage: null,
|
||||
datasource: action.datasource,
|
||||
});
|
||||
},
|
||||
[actions.CREATE_DATASOURCE_FAILED]() {
|
||||
return Object.assign({}, state, {
|
||||
isDatasourceLoading: false,
|
||||
errorMessage: action.err,
|
||||
});
|
||||
},
|
||||
};
|
||||
if (action.type in actionHandlers) {
|
||||
return actionHandlers[action.type]();
|
||||
|
||||
Reference in New Issue
Block a user