| Index: appengine/swarming/elements/res/imp/tasklist/task-list.html
|
| diff --git a/appengine/swarming/elements/res/imp/tasklist/task-list.html b/appengine/swarming/elements/res/imp/tasklist/task-list.html
|
| index 5be3c649271cb04061a61c5b53e877dad87250b7..1fd26648a84f7fdfb600ae9d1c851cd5c15234e6 100644
|
| --- a/appengine/swarming/elements/res/imp/tasklist/task-list.html
|
| +++ b/appengine/swarming/elements/res/imp/tasklist/task-list.html
|
| @@ -332,25 +332,9 @@
|
| }
|
| var id = task.task_id
|
|
|
| - // Keep toast displayed until we hear back from the cancel.
|
| - this.$.toast.duration = 0;
|
| this.$.toast.text="Canceling task " + id;
|
| - this.$.toast.open();
|
| var url = "/_ah/api/swarming/v1/task/" + id +"/cancel";
|
| - sk.request("POST", url, undefined, this._auth_headers).then(function(response) {
|
| - this.$.toast.close();
|
| - this.$.toast.show({
|
| - text: "Request sent. Response: "+response,
|
| - duration: 3000,
|
| - });
|
| - }.bind(this)).catch(function(reason) {
|
| - console.log("Cancellation failed", reason);
|
| - this.$.toast.close();
|
| - this.$.toast.show({
|
| - text: "Request failed. Reason: "+reason,
|
| - duration: 3000,
|
| - });
|
| - }.bind(this));
|
| + this._postWithToast(url, this.$.toast, this._auth_headers);
|
| },
|
|
|
| _tag: function(task, col) {
|
|
|