Chromium Code Reviews| 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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 241 <paper-button dialog-dismiss autofocus>No</paper-button> | 241 <paper-button dialog-dismiss autofocus>No</paper-button> |
| 242 <paper-button dialog-confirm>Yes</paper-button> | 242 <paper-button dialog-confirm>Yes</paper-button> |
| 243 </div> | 243 </div> |
| 244 </paper-dialog> | 244 </paper-dialog> |
| 245 | 245 |
| 246 <error-toast></error-toast> | 246 <error-toast></error-toast> |
| 247 | 247 |
| 248 </template> | 248 </template> |
| 249 <script> | 249 <script> |
| 250 (function(){ | 250 (function(){ |
| 251 var specialColumns = ["deduped_from", "name", "state", "bot"]; | 251 var specialColumns = ["deduped_from", "name", "state", "bot", "sk_revision"] ; |
|
M-A Ruel
2016/10/12 19:35:07
This is still very one off. I would have preferred
kjlubick
2016/10/12 20:02:38
I can take care of it in this CL and update our sw
| |
| 252 | 252 |
| 253 // Given a time attribute like "abandoned_ts", humanTime returns a function | 253 // Given a time attribute like "abandoned_ts", humanTime returns a function |
| 254 // that returns the human-friendly version of that attribute. The human | 254 // that returns the human-friendly version of that attribute. The human |
| 255 // friendly time was created in task-list-data. | 255 // friendly time was created in task-list-data. |
| 256 function humanTime(attr) { | 256 function humanTime(attr) { |
| 257 return function(task) { | 257 return function(task) { |
| 258 return this._attribute(task, "human_" + attr)[0]; | 258 return this._attribute(task, "human_" + attr)[0]; |
| 259 } | 259 } |
| 260 } | 260 } |
| 261 var columnMap = { | 261 var columnMap = { |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 reload: function() { | 417 reload: function() { |
| 418 if (!this._auth_headers || !this._query_params) { | 418 if (!this._auth_headers || !this._query_params) { |
| 419 return; | 419 return; |
| 420 } | 420 } |
| 421 var url = "/_ah/api/swarming/v1/tasks/list?" + sk.query.fromParamSet(thi s._query_params); | 421 var url = "/_ah/api/swarming/v1/tasks/list?" + sk.query.fromParamSet(thi s._query_params); |
| 422 this.$.page_tasks.load(url,this._auth_headers); | 422 this.$.page_tasks.load(url,this._auth_headers); |
| 423 }, | 423 }, |
| 424 | 424 |
| 425 _skLink: function(task) { | 425 _skLink: function(task) { |
| 426 var r = this._attribute(task, "sk_revision")[0]; | 426 var r = this._attribute(task, "sk_revision")[0]; |
| 427 if (r === "none") { | 427 var repo = this._attribute(task, "sk_repo")[0]; |
| 428 if (r === "none" || repo === "none") { | |
| 428 return false; | 429 return false; |
| 429 } | 430 } |
| 430 return "https://skia.googlesource.com/skia/+/" + r; | 431 return repo + "/+/"+ r; |
|
M-A Ruel
2016/10/12 19:35:07
This is completely GoB specific. I'd like somethin
kjlubick
2016/10/12 20:02:38
Done. Like the other things, it's a "replace %s w
| |
| 431 }, | 432 }, |
| 432 | 433 |
| 433 _tag: function(task, col) { | 434 _tag: function(task, col) { |
| 434 if (!task || !task.tagMap) { | 435 if (!task || !task.tagMap) { |
| 435 return undefined; | 436 return undefined; |
| 436 } | 437 } |
| 437 return task.tagMap[col]; | 438 return task.tagMap[col]; |
| 438 }, | 439 }, |
| 439 | 440 |
| 440 _taskClass: function(task) { | 441 _taskClass: function(task) { |
| 441 return this.stateClass(this._column("state", task)); | 442 return this.stateClass(this._column("state", task)); |
| 442 } | 443 } |
| 443 }); | 444 }); |
| 444 })(); | 445 })(); |
| 445 </script> | 446 </script> |
| 446 </dom-module> | 447 </dom-module> |
| OLD | NEW |