Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1267)

Side by Side Diff: appengine/swarming/ui/res/imp/taskpage/task-page.html

Issue 2928803003: Swarming UI: Fix issue with negative pending time. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 if (start.getTime() >= end.getTime()) {
Ryan Tseng 2017/06/07 22:06:59 to avoid calling getTime() this many times, i'd pr
ayanaadylova 2017/06/07 22:12:25 Done.
924 return 0;
925 }
923 return end.getTime() - start.getTime(); 926 return end.getTime() - start.getTime();
924 }, 927 },
925 928
926 _empty: function(array) { 929 _empty: function(array) {
927 return !array || array.length == 0; 930 return !array || array.length == 0;
928 }, 931 },
929 932
930 _eq: function(a,b) { 933 _eq: function(a,b) {
931 return a === b; 934 return a === b;
932 }, 935 },
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1172 1175
1173 this._getJsonAsync("_other_running", "/api/swarming/v1/tasks/count", "_b usyRunningCount", this._auth_headers, taskCountParams); 1176 this._getJsonAsync("_other_running", "/api/swarming/v1/tasks/count", "_b usyRunningCount", this._auth_headers, taskCountParams);
1174 // change running to pending 1177 // change running to pending
1175 taskCountParams.state = ["PENDING"]; 1178 taskCountParams.state = ["PENDING"];
1176 this._getJsonAsync("_other_pending", "/api/swarming/v1/tasks/count", "_b usyPendingCount", this._auth_headers, taskCountParams); 1179 this._getJsonAsync("_other_pending", "/api/swarming/v1/tasks/count", "_b usyPendingCount", this._auth_headers, taskCountParams);
1177 } 1180 }
1178 }); 1181 });
1179 })(); 1182 })();
1180 </script> 1183 </script>
1181 </dom-module> 1184 </dom-module>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698