| OLD | NEW |
| 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 by the Apache v2.0 license that can be | 3 # Use of this source code is governed by the Apache v2.0 license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 --> | 5 --> |
| 6 <!DOCTYPE html> | 6 <!DOCTYPE html> |
| 7 <html> | 7 <html> |
| 8 <head> | 8 <head> |
| 9 <title>Swarming index Demo</title> | 9 <title>Swarming index Demo</title> |
| 10 <meta charset="utf-8"> | 10 <meta charset="utf-8"> |
| 11 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | 11 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 12 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-
scale=1, user-scalable=yes"> | 12 <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-
scale=1, user-scalable=yes"> |
| 13 <script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></scri
pt> | 13 <script src="../bower_components/webcomponentsjs/webcomponents-lite.js"></scri
pt> |
| 14 <script src="../../../node_modules/skia-common-js/common.js"></script> | 14 <script src="../../../node_modules/skia-common-js/common.js"></script> |
| 15 <script src="/res/js/common.js"></script> | 15 <script src="/res/js/common.js"></script> |
| 16 <script src="/res/js/alias.js"></script> | 16 <script src="/res/js/alias.js"></script> |
| 17 <script src="../../../node_modules/sinon/pkg/sinon-1.17.5.js"></script> | 17 <script src="../../../node_modules/sinon/pkg/sinon-1.17.5.js"></script> |
| 18 | 18 |
| 19 <!-- Makes a var called stats--> |
| 20 <script type="text/javascript" src="index-overview-stats-demo.json"></script> |
| 21 |
| 19 <script type="text/javascript" charset="utf-8"> | 22 <script type="text/javascript" charset="utf-8"> |
| 20 sinon.format = function(object) {return JSON.stringify(object);} | 23 sinon.format = function(object) {return JSON.stringify(object);} |
| 21 sinon.log = function(message) {console.log(message);}; | 24 sinon.log = function(message) {console.log(message);}; |
| 22 var server = sinon.fakeServer.create(); | 25 var server = sinon.fakeServer.create(); |
| 23 server.autoRespondAfter = 1200; | 26 server.autoRespondAfter = 1200; |
| 24 server.autoRespond = true; | 27 server.autoRespond = true; |
| 25 | 28 |
| 26 var details = { | 29 var details = { |
| 27 server_version: "1234-deadbeef", | 30 server_version: "1234-deadbeef", |
| 28 bot_version: "abcdoeraymeyouandme", | 31 bot_version: "abcdoeraymeyouandme", |
| (...skipping 16 matching lines...) Expand all Loading... |
| 45 get_bootstrap_token: true | 48 get_bootstrap_token: true |
| 46 }; | 49 }; |
| 47 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/server\/permissions/,
JSON.stringify(permissions)); | 50 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/server\/permissions/,
JSON.stringify(permissions)); |
| 48 server.respondWith("GET", /^\/api\/swarming\/v1\/server\/permissions/, JSON.
stringify(permissions)); | 51 server.respondWith("GET", /^\/api\/swarming\/v1\/server\/permissions/, JSON.
stringify(permissions)); |
| 49 | 52 |
| 50 var token = { | 53 var token = { |
| 51 bootstrap_token: "8675309JennyDontChangeYourNumber8675309" | 54 bootstrap_token: "8675309JennyDontChangeYourNumber8675309" |
| 52 }; | 55 }; |
| 53 server.respondWith("POST", /^\/_ah\/api\/swarming\/v1\/server\/token/, JSON
.stringify(token)); | 56 server.respondWith("POST", /^\/_ah\/api\/swarming\/v1\/server\/token/, JSON
.stringify(token)); |
| 54 server.respondWith("POST", /^\/api\/swarming\/v1\/server\/token/, JSON.strin
gify(token)); | 57 server.respondWith("POST", /^\/api\/swarming\/v1\/server\/token/, JSON.strin
gify(token)); |
| 58 |
| 59 server.respondWith("GET", "/swarming/api/v1/stats/summary/minutes?duration=2
0",JSON.stringify(stats)); |
| 55 </script> | 60 </script> |
| 56 | 61 |
| 57 <link rel="import" href="swarming-index.html"> | 62 <link rel="import" href="swarming-index.html"> |
| 58 </head> | 63 </head> |
| 59 <body> | 64 <body> |
| 60 | 65 |
| 61 <swarming-index | 66 <swarming-index |
| 62 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent
.com"> | 67 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent
.com"> |
| 63 </swarming-index> | 68 </swarming-index> |
| 64 | 69 |
| 65 </body> | 70 </body> |
| 66 </html> | 71 </html> |
| OLD | NEW |