| 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 This in an HTML Import-able file that contains the definition | 6 This in an HTML Import-able file that contains the definition |
| 7 of the following elements: | 7 of the following elements: |
| 8 | 8 |
| 9 <task-list> | 9 <task-list> |
| 10 | 10 |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 def = "none"; | 277 def = "none"; |
| 278 } | 278 } |
| 279 var retVal = this._tag(task, col) || task[col] || [def]; | 279 var retVal = this._tag(task, col) || task[col] || [def]; |
| 280 if (!Array.isArray(retVal)) { | 280 if (!Array.isArray(retVal)) { |
| 281 return [retVal]; | 281 return [retVal]; |
| 282 } | 282 } |
| 283 return retVal; | 283 return retVal; |
| 284 }, | 284 }, |
| 285 | 285 |
| 286 _cannotCancel: function(task, permissions) { | 286 _cannotCancel: function(task, permissions) { |
| 287 return !(permissions && permissions.can_cancel_task && | 287 return !(permissions && permissions.cancel_task && |
| 288 this._column("state", task) === "PENDING"); | 288 this._column("state", task) === "PENDING"); |
| 289 }, | 289 }, |
| 290 | 290 |
| 291 _cancelTask: function(e) { | 291 _cancelTask: function(e) { |
| 292 var task = e.model.task; | 292 var task = e.model.task; |
| 293 if (!task || !task.task_id) { | 293 if (!task || !task.task_id) { |
| 294 console.log("Missing task info", task); | 294 console.log("Missing task info", task); |
| 295 return | 295 return |
| 296 } | 296 } |
| 297 var id = task.task_id | 297 var id = task.task_id |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 if (state === "RUNNING" || state === "PENDING") { | 346 if (state === "RUNNING" || state === "PENDING") { |
| 347 return "pending"; | 347 return "pending"; |
| 348 } | 348 } |
| 349 return ""; | 349 return ""; |
| 350 } | 350 } |
| 351 | 351 |
| 352 }); | 352 }); |
| 353 })(); | 353 })(); |
| 354 </script> | 354 </script> |
| 355 </dom-module> | 355 </dom-module> |
| OLD | NEW |