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

Unified Diff: appengine/swarming/elements/res/imp/botpage/bot-page-demo.html

Issue 2372323002: Add pageable data widget (Closed) Base URL: git@github.com:luci/luci-py@master
Patch Set: rebase Created 4 years, 3 months 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
Index: appengine/swarming/elements/res/imp/botpage/bot-page-demo.html
diff --git a/appengine/swarming/elements/res/imp/botpage/bot-page-demo.html b/appengine/swarming/elements/res/imp/botpage/bot-page-demo.html
index 818864001b747475f456db529a007e1dba9341be..cb92690bb6b1912f704e85fb78eb1bc967478062 100644
--- a/appengine/swarming/elements/res/imp/botpage/bot-page-demo.html
+++ b/appengine/swarming/elements/res/imp/botpage/bot-page-demo.html
@@ -45,12 +45,12 @@
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);
+ item = Math.max(item - 1, 0);
+ item = Math.min(item, arr.length-1);
}
- request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(arr[name]));
+ request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(arr[item]));
}
}

Powered by Google App Engine
This is Rietveld 408576698