| 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 <bot-list-data> | 9 <bot-list-data> |
| 10 | 10 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 // TODO(kjlubick): Allow a person to sort on the task list by bot | 194 // TODO(kjlubick): Allow a person to sort on the task list by bot |
| 195 pMap["bot"] = []; | 195 pMap["bot"] = []; |
| 196 TIMES.forEach(function(t) { | 196 TIMES.forEach(function(t) { |
| 197 pMap[t] = []; | 197 pMap[t] = []; |
| 198 }); | 198 }); |
| 199 | 199 |
| 200 return pMap; | 200 return pMap; |
| 201 }, | 201 }, |
| 202 | 202 |
| 203 parseTasks: function(json) { | 203 parseTasks: function(json) { |
| 204 console.log("ping", json); | |
| 205 if (!json|| !json.items) { | 204 if (!json|| !json.items) { |
| 206 return []; | 205 return []; |
| 207 } | 206 } |
| 208 var now = new Date(); | 207 var now = new Date(); |
| 209 | 208 |
| 210 // Do any preprocessing here | 209 // Do any preprocessing here |
| 211 json.items.forEach(function(t) { | 210 json.items.forEach(function(t) { |
| 212 var tagMap = {}; | 211 var tagMap = {}; |
| 213 t.tags = t.tags || []; | 212 t.tags = t.tags || []; |
| 214 t.tags.forEach(function(tag) { | 213 t.tags.forEach(function(tag) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 233 if (t.duration){ | 232 if (t.duration){ |
| 234 t.human_duration = this._humanDuration(t.duration); | 233 t.human_duration = this._humanDuration(t.duration); |
| 235 } | 234 } |
| 236 }.bind(this)); | 235 }.bind(this)); |
| 237 return json.items; | 236 return json.items; |
| 238 } | 237 } |
| 239 }); | 238 }); |
| 240 })(); | 239 })(); |
| 241 </script> | 240 </script> |
| 242 </dom-module> | 241 </dom-module> |
| OLD | NEW |