| 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 d3f963984228029f8935ef3a9e75ea678cab1e56..800799044364d4547e5a06cda3e0abfc74e3af4d 100644
|
| --- a/appengine/swarming/elements/res/imp/botpage/bot-page-demo.html
|
| +++ b/appengine/swarming/elements/res/imp/botpage/bot-page-demo.html
|
| @@ -39,8 +39,18 @@
|
| }
|
| sinon.log("User authenticated :) "+ request.requestHeaders.authorization);
|
| sinon.log("Bot Request: "+sinon.format(request));
|
| - // TODO(kjlubick)make this return a thing from the list
|
| - request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(arr[0]));
|
| + // If the user changes bot id, show them some of the other sample data.
|
| + var idx = request.url.indexOf("-00");
|
| + 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);
|
| + }
|
| +
|
| +
|
| + request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(arr[name]));
|
| }
|
| }
|
|
|
|
|