| 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 bffc60cf4dd156ffa041d57651e37228637e38a8..8d1930007243259befa601681e6d65568804a4b6 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]));
|
| }
|
| }
|
|
|
|
|