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

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

Issue 2991653002: Fix Actual CIPD versions (Closed)
Patch Set: Created 3 years, 5 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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 // Add one because rowSpan counts from 1. 856 // Add one because rowSpan counts from 1.
857 return rowSpan + 1; 857 return rowSpan + 1;
858 }, 858 },
859 859
860 _cipdPackages: function(request, result) { 860 _cipdPackages: function(request, result) {
861 if (!request || !request.properties || !request.properties.cipd_input) { 861 if (!request || !request.properties || !request.properties.cipd_input) {
862 return []; 862 return [];
863 } 863 }
864 var packages = request.properties.cipd_input.packages || []; 864 var packages = request.properties.cipd_input.packages || [];
865 var actual = (result && result.cipd_pins && result.cipd_pins.packages) | | []; 865 var actual = (result && result.cipd_pins && result.cipd_pins.packages) | | [];
866 packages.forEach(function(p) { 866 packages.forEach(function(p, i) {
867 p.requested = p.package_name + ":" + p.version; 867 p.requested = p.package_name + ":" + p.version;
868 actual.forEach(function(c) { 868 // This makes the key assumption that the actual cipd array is in the same order
869 if (c.path === p.path) { 869 // as the requested one. Otherwise, there's no easy way to match them up, because
870 p.actual = c.package_name + ":" + c.version; 870 // of the wildcards (e.g. requested is foo/${platform} and actual is f oo/linux-amd64)
871 } 871 if (actual[i]) {
872 }); 872 p.actual = actual[i].package_name + ":" + actual[i].version;
873 }
873 }); 874 });
874 return packages; 875 return packages;
875 }, 876 },
876 877
877 _classRight: function(wide_logs) { 878 _classRight: function(wide_logs) {
878 if (wide_logs) { 879 if (wide_logs) {
879 return "full-width"; 880 return "full-width";
880 } 881 }
881 return ""; 882 return "";
882 }, 883 },
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 1177
1177 this._getJsonAsync("_other_running", "/api/swarming/v1/tasks/count", "_b usyRunningCount", this._auth_headers, taskCountParams); 1178 this._getJsonAsync("_other_running", "/api/swarming/v1/tasks/count", "_b usyRunningCount", this._auth_headers, taskCountParams);
1178 // change running to pending 1179 // change running to pending
1179 taskCountParams.state = ["PENDING"]; 1180 taskCountParams.state = ["PENDING"];
1180 this._getJsonAsync("_other_pending", "/api/swarming/v1/tasks/count", "_b usyPendingCount", this._auth_headers, taskCountParams); 1181 this._getJsonAsync("_other_pending", "/api/swarming/v1/tasks/count", "_b usyPendingCount", this._auth_headers, taskCountParams);
1181 } 1182 }
1182 }); 1183 });
1183 })(); 1184 })();
1184 </script> 1185 </script>
1185 </dom-module> 1186 </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