Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(847)

Unified Diff: appengine/swarming/ui/res/imp/taskpage/task-page-data.html

Issue 2470973003: give user notification if bot or task not found (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/ui/res/imp/taskpage/task-page.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/ui/res/imp/taskpage/task-page-data.html
diff --git a/appengine/swarming/ui/res/imp/taskpage/task-page-data.html b/appengine/swarming/ui/res/imp/taskpage/task-page-data.html
index 98746586ae5754d3f5c76ba2598736180b4b4efb..9becaf1117b2e506da422b777b44070f66749f10 100644
--- a/appengine/swarming/ui/res/imp/taskpage/task-page-data.html
+++ b/appengine/swarming/ui/res/imp/taskpage/task-page-data.html
@@ -91,6 +91,11 @@
computed: "_parseStdout(_stdout)",
notify: true,
},
+ task_exists: {
+ type: Boolean,
+ value: true,
+ notify: true,
+ },
// private
_busy1: {
@@ -132,8 +137,17 @@
var baseUrl = "/api/swarming/v1/task/" + this.task_id;
lastRequest = this.async(function(){
lastRequest = undefined;
- this._getJsonAsync("_request", baseUrl + "/request",
+ var p = this._getJsonAsync("_request", baseUrl + "/request",
"_busy1", this.auth_headers);
+ p.then(function(){
+ this.set("task_exists", true);
+ }.bind(this)).catch(function(r){
+ if (r.status === 404) {
+ this.set("task_exists", false);
+ } else {
+ sk.errorMessage("Http response: "+ (r.status || " ") + " " + r.response);
+ }
+ }.bind(this));
this._getJsonAsync("_result",
baseUrl + "/result?include_performance_stats=true",
"_busy2", this.auth_headers);
« no previous file with comments | « appengine/swarming/ui/res/imp/taskpage/task-page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698