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

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: Add docs 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 6e068ec13d1b92e5d0ec5558596a8ba1dd4a84d0..4f71240d862fbc7f03b4373de7ae8bb8014cb883 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