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

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

Issue 2497663003: Make silent task retries more obvious (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-demo.html
diff --git a/appengine/swarming/ui/res/imp/taskpage/task-page-demo.html b/appengine/swarming/ui/res/imp/taskpage/task-page-demo.html
index 70b349c0650b174e0050d07f94a1cefb95e23077..7cc269158fa1a2fc26a2de8a967e606607732fd9 100644
--- a/appengine/swarming/ui/res/imp/taskpage/task-page-demo.html
+++ b/appengine/swarming/ui/res/imp/taskpage/task-page-demo.html
@@ -43,15 +43,17 @@
sinon.log("Bot Request: "+sinon.format(request));
// If the user changes bot id, show them some of the other sample data.
var idx = request.url.indexOf("f00");
- var item = 0;
- if (idx !=-1) {
- var name = request.url.substring(idx+1, idx+4);
- item = parseInt(name) || 0;
- name = Math.max(name - 1, 0);
- name = Math.min(name, arr.length-1);
+ if (idx ===-1) {
+ request.respond(404, {}, "Not found");
+ return;
}
+ idx = request.url.substring(idx+1, idx+4);
+ idx = parseInt(idx) || 0;
+ idx = Math.max(idx - 1, 0);
+ idx = Math.min(idx, arr.length-1);
- request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(arr[name]));
+
+ request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(arr[idx]));
}
}
@@ -105,7 +107,7 @@
<body>
<task-page
- task_id="abcdef001"
+ task_id="abcdef000"
client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent.com">
</task-page>
« 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