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

Side by Side Diff: appengine/swarming/elements/res/imp/botlist/bot-list-demo.html

Issue 2204483002: Add UI to new botlist to show summary (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@bot-summary-api
Patch Set: Add docs Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 Copyright 2016 The LUCI Authors. All rights reserved. 2 Copyright 2016 The LUCI Authors. All rights reserved.
3 Use of this source code is governed under the Apache License, Version 2.0 3 Use of this source code is governed under the Apache License, Version 2.0
4 that can be found in the LICENSE file. 4 that can be found in the LICENSE file.
5 5
6 --> 6 -->
7 <!DOCTYPE html> 7 <!DOCTYPE html>
8 <html> 8 <html>
9 <head> 9 <head>
10 <title>bot-list Demo</title> 10 <title>bot-list Demo</title>
(...skipping 17 matching lines...) Expand all
28 sinon.log("You must be logged in (check your Oauth?)"); 28 sinon.log("You must be logged in (check your Oauth?)");
29 request.respond(403, {}, "You must be logged in (check your Oauth?)"); 29 request.respond(403, {}, "You must be logged in (check your Oauth?)");
30 return; 30 return;
31 } 31 }
32 sinon.log("User authenticated :) "+ request.requestHeaders.authorization); 32 sinon.log("User authenticated :) "+ request.requestHeaders.authorization);
33 request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(d ata)); 33 request.respond(200, {"Content-Type":"application/json"}, JSON.stringify(d ata));
34 } 34 }
35 35
36 server.respondWith("GET", "/_ah/api/swarming/v1/bots/list", respond); 36 server.respondWith("GET", "/_ah/api/swarming/v1/bots/list", respond);
37 server.respondWith("GET", "/api/swarming/v1/bots/list", respond); 37 server.respondWith("GET", "/api/swarming/v1/bots/list", respond);
38
39 var mockFleetSummary = {
40 "count": "2625",
41 "busy": "531",
42 "now": "2016-08-01T17:21:07.239940",
43 "dead": "22",
44 "quarantined": "15",
45 "kind": "swarming#botsItem",
46 "etag": "\"nhThK35uIVdvx1_Mr5DChu_DyBs/aO8fy5IdESDx-fy3If19oDKu0f0\""
47 };
48
49 server.respondWith("GET", "/_ah/api/swarming/v1/bots/count", JSON.stringify( mockFleetSummary));
50 server.respondWith("GET", "/api/swarming/v1/bots/count", JSON.stringify(mock FleetSummary));
38 </script> 51 </script>
39 52
40 <link rel="import" href="bot-list.html"> 53 <link rel="import" href="bot-list.html">
41 </head> 54 </head>
42 <body> 55 <body>
43 56
44 <bot-list></bot-list> 57 <bot-list></bot-list>
45 58
46 </body> 59 </body>
47 </html> 60 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698