[superset-client][bugfix] fix stop query (#6179)
This commit is contained in:
parent
6ec9e1a4e9
commit
60796da38c
|
|
@ -174,7 +174,7 @@ export function runQuery(formData, force = false, timeout = 60, key) {
|
|||
|
||||
if (response.statusText === 'timeout') {
|
||||
return dispatch(chartUpdateTimeout(response.statusText, timeout, key));
|
||||
} else if (response.statusText === 'AbortError') {
|
||||
} else if (response.name === 'AbortError') {
|
||||
return dispatch(chartUpdateStopped(key));
|
||||
}
|
||||
return getClientErrorObject(response).then(parsedResponse =>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export const chart = {
|
|||
chartUpdateEndTime: null,
|
||||
chartUpdateStartTime: 0,
|
||||
latestQueryFormData: {},
|
||||
queryRequest: null,
|
||||
queryController: null,
|
||||
queryResponse: null,
|
||||
triggerQuery: true,
|
||||
lastRendered: 0,
|
||||
|
|
@ -32,12 +32,13 @@ export default function chartReducer(charts = {}, action) {
|
|||
};
|
||||
},
|
||||
[actions.CHART_UPDATE_STARTED](state) {
|
||||
return { ...state,
|
||||
return {
|
||||
...state,
|
||||
chartStatus: 'loading',
|
||||
chartAlert: null,
|
||||
chartUpdateEndTime: null,
|
||||
chartUpdateStartTime: now(),
|
||||
queryRequest: action.queryRequest,
|
||||
queryController: action.queryController,
|
||||
};
|
||||
},
|
||||
[actions.CHART_UPDATE_STOPPED](state) {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,6 @@ import { toggleCheckbox } from './modules/utils';
|
|||
import setupClient from './setup/setupClient';
|
||||
import setupColors from './setup/setupColors';
|
||||
|
||||
setupClient();
|
||||
setupColors();
|
||||
|
||||
$(document).ready(function () {
|
||||
$(':checkbox[data-checkbox-api-prefix]').change(function () {
|
||||
const $this = $(this);
|
||||
|
|
@ -31,6 +28,9 @@ $(document).ready(function () {
|
|||
});
|
||||
|
||||
export function appSetup() {
|
||||
setupClient();
|
||||
setupColors();
|
||||
|
||||
// A set of hacks to allow apps to run within a FAB template
|
||||
// this allows for the server side generated menus to function
|
||||
window.$ = $;
|
||||
|
|
|
|||
Loading…
Reference in New Issue