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

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: Vulcanized files. 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 | « appengine/swarming/ui/build/elements.html ('k') | 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 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
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>
OLDNEW
« no previous file with comments | « appengine/swarming/ui/build/elements.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698