mirror of
https://github.com/apache/superset.git
synced 2024-09-17 11:09:47 -04:00
Making the stop button instantaneous (#2738)
This commit is contained in:
parent
baebba1159
commit
22d8075c53
@ -164,15 +164,17 @@ export function postStopQuery(query) {
|
|||||||
return function (dispatch) {
|
return function (dispatch) {
|
||||||
const stopQueryUrl = '/superset/stop_query/';
|
const stopQueryUrl = '/superset/stop_query/';
|
||||||
const stopQueryRequestData = { client_id: query.id };
|
const stopQueryRequestData = { client_id: query.id };
|
||||||
|
dispatch(stopQuery(query));
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
url: stopQueryUrl,
|
url: stopQueryUrl,
|
||||||
data: stopQueryRequestData,
|
data: stopQueryRequestData,
|
||||||
success() {
|
success() {
|
||||||
if (!query.runAsync) {
|
notify.success('Query was stopped.');
|
||||||
dispatch(stopQuery(query));
|
},
|
||||||
}
|
error() {
|
||||||
|
notify.error('Failed at stopping query.');
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user