| 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 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>task-list Demo</title> | 10 <title>task-list Demo</title> |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 if (!request.requestHeaders.authorization) { | 55 if (!request.requestHeaders.authorization) { |
| 56 sinon.log("You must be logged in (check your Oauth?)"); | 56 sinon.log("You must be logged in (check your Oauth?)"); |
| 57 request.respond(403, {}, "You must be logged in (check your Oauth?)"); | 57 request.respond(403, {}, "You must be logged in (check your Oauth?)"); |
| 58 return; | 58 return; |
| 59 } | 59 } |
| 60 request.respond(200, {}, "Task has been cancelled"); | 60 request.respond(200, {}, "Task has been cancelled"); |
| 61 } | 61 } |
| 62 | 62 |
| 63 server.respondWith("POST", /^\/_ah\/api\/swarming\/v1\/task\/.+\/cancel/, ca
ncel); | 63 server.respondWith("POST", /^\/_ah\/api\/swarming\/v1\/task\/.+\/cancel/, ca
ncel); |
| 64 server.respondWith("POST", /^\/api\/swarming\/v1\/task\/.+\/cancel/, cancel)
; | 64 server.respondWith("POST", /^\/api\/swarming\/v1\/task\/.+\/cancel/, cancel)
; |
| 65 |
| 66 var permissions = { |
| 67 cancel_task: true |
| 68 }; |
| 69 server.respondWith("GET", /^\/_ah\/api\/swarming\/v1\/server\/permissions/,
JSON.stringify(permissions)); |
| 70 server.respondWith("GET", /^\/api\/swarming\/v1\/server\/permissions/, JSON.
stringify(permissions)); |
| 65 </script> | 71 </script> |
| 66 | 72 |
| 67 <link rel="import" href="task-list.html"> | 73 <link rel="import" href="task-list.html"> |
| 68 </head> | 74 </head> |
| 69 <body> | 75 <body> |
| 70 | 76 |
| 71 <task-list | 77 <task-list |
| 72 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent
.com"> | 78 client_id="20770472288-t5smpbpjptka4nd888fv0ctd23ftba2o.apps.googleusercontent
.com"> |
| 73 </task-list> | 79 </task-list> |
| 74 | 80 |
| 75 </body> | 81 </body> |
| 76 </html> | 82 </html> |
| OLD | NEW |