| 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-page> | 9 <task-page> |
| 10 | 10 |
| (...skipping 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 }, | 913 }, |
| 914 | 914 |
| 915 _disambiguate: function(taskId, result) { | 915 _disambiguate: function(taskId, result) { |
| 916 if (!taskId.endsWith("0") || !result) { | 916 if (!taskId.endsWith("0") || !result) { |
| 917 return false; | 917 return false; |
| 918 } | 918 } |
| 919 return result.try_number > 1; | 919 return result.try_number > 1; |
| 920 }, | 920 }, |
| 921 | 921 |
| 922 _duration: function(start, end) { | 922 _duration: function(start, end) { |
| 923 return end.getTime() - start.getTime(); | 923 var duration = end.getTime() - start.getTime(); |
| 924 if (duration < 0) { |
| 925 duration = 0; |
| 926 } |
| 927 return duration; |
| 924 }, | 928 }, |
| 925 | 929 |
| 926 _empty: function(array) { | 930 _empty: function(array) { |
| 927 return !array || array.length == 0; | 931 return !array || array.length == 0; |
| 928 }, | 932 }, |
| 929 | 933 |
| 930 _eq: function(a,b) { | 934 _eq: function(a,b) { |
| 931 return a === b; | 935 return a === b; |
| 932 }, | 936 }, |
| 933 | 937 |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 | 1176 |
| 1173 this._getJsonAsync("_other_running", "/api/swarming/v1/tasks/count", "_b
usyRunningCount", this._auth_headers, taskCountParams); | 1177 this._getJsonAsync("_other_running", "/api/swarming/v1/tasks/count", "_b
usyRunningCount", this._auth_headers, taskCountParams); |
| 1174 // change running to pending | 1178 // change running to pending |
| 1175 taskCountParams.state = ["PENDING"]; | 1179 taskCountParams.state = ["PENDING"]; |
| 1176 this._getJsonAsync("_other_pending", "/api/swarming/v1/tasks/count", "_b
usyPendingCount", this._auth_headers, taskCountParams); | 1180 this._getJsonAsync("_other_pending", "/api/swarming/v1/tasks/count", "_b
usyPendingCount", this._auth_headers, taskCountParams); |
| 1177 } | 1181 } |
| 1178 }); | 1182 }); |
| 1179 })(); | 1183 })(); |
| 1180 </script> | 1184 </script> |
| 1181 </dom-module> | 1185 </dom-module> |
| OLD | NEW |