mirror of
https://github.com/apache/superset.git
synced 2026-04-20 16:44:46 +00:00
[explore] show the broken query when failing (#1871)
* Return query when failing * Linting * sjson -> simplejson
This commit is contained in:
committed by
GitHub
parent
e3b296c558
commit
c14c7edc5e
@@ -108,16 +108,14 @@ export const exploreReducer = function (state, action) {
|
||||
);
|
||||
},
|
||||
[actions.CHART_UPDATE_SUCCEEDED]() {
|
||||
const vizUpdates = {
|
||||
query: action.query,
|
||||
};
|
||||
return Object.assign(
|
||||
{},
|
||||
state,
|
||||
{
|
||||
chartStatus: 'success',
|
||||
viz: Object.assign({}, state.viz, vizUpdates),
|
||||
});
|
||||
viz: Object.assign({}, state.viz, { query: action.query }),
|
||||
}
|
||||
);
|
||||
},
|
||||
[actions.CHART_UPDATE_STARTED]() {
|
||||
const chartUpdateStartTime = now();
|
||||
@@ -138,9 +136,12 @@ export const exploreReducer = function (state, action) {
|
||||
});
|
||||
},
|
||||
[actions.CHART_UPDATE_FAILED]() {
|
||||
const chartUpdateEndTime = now();
|
||||
return Object.assign({}, state,
|
||||
{ chartStatus: 'failed', chartAlert: action.error, chartUpdateEndTime });
|
||||
return Object.assign({}, state, {
|
||||
chartStatus: 'failed',
|
||||
chartAlert: action.error,
|
||||
chartUpdateEndTime: now(),
|
||||
viz: Object.assign({}, state.viz, { query: action.query }),
|
||||
});
|
||||
},
|
||||
[actions.UPDATE_CHART_STATUS]() {
|
||||
const newState = Object.assign({}, state, { chartStatus: action.status });
|
||||
|
||||
Reference in New Issue
Block a user