Skip to content

Commit

Permalink
Making the stop button instantaneous
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed May 9, 2017
1 parent baebba1 commit 9252a25
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions superset/assets/javascripts/SqlLab/actions.js
Expand Up @@ -164,15 +164,17 @@ export function postStopQuery(query) {
return function (dispatch) {
const stopQueryUrl = '/superset/stop_query/';
const stopQueryRequestData = { client_id: query.id };
dispatch(stopQuery(query));
$.ajax({
type: 'POST',
dataType: 'json',
url: stopQueryUrl,
data: stopQueryRequestData,
success() {
if (!query.runAsync) {
dispatch(stopQuery(query));
}
notify.success('Query was stopped.');
},
error() {
notify.error('Failed at stopping query.');
},
});
};
Expand Down

0 comments on commit 9252a25

Please sign in to comment.