未验证 提交 60796da3 编写于 作者: C Chris Williams 提交者: GitHub

[superset-client][bugfix] fix stop query (#6179)

上级 6ec9e1a4
......@@ -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.$ = $;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册