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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/ui/build/elements.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/ui/res/imp/taskpage/task-page.html
diff --git a/appengine/swarming/ui/res/imp/taskpage/task-page.html b/appengine/swarming/ui/res/imp/taskpage/task-page.html
index 71a63e32f461b4e5a707067a4325a011698fedd9..8d447a4005404ee4fb2d4ad074b6673a8f5e4253 100644
--- a/appengine/swarming/ui/res/imp/taskpage/task-page.html
+++ b/appengine/swarming/ui/res/imp/taskpage/task-page.html
@@ -863,13 +863,14 @@
}
var packages = request.properties.cipd_input.packages || [];
var actual = (result && result.cipd_pins && result.cipd_pins.packages) || [];
- packages.forEach(function(p) {
+ packages.forEach(function(p, i) {
p.requested = p.package_name + ":" + p.version;
- actual.forEach(function(c) {
- if (c.path === p.path) {
- p.actual = c.package_name + ":" + c.version;
- }
- });
+ // This makes the key assumption that the actual cipd array is in the same order
+ // as the requested one. Otherwise, there's no easy way to match them up, because
+ // of the wildcards (e.g. requested is foo/${platform} and actual is foo/linux-amd64)
+ if (actual[i]) {
+ p.actual = actual[i].package_name + ":" + actual[i].version;
+ }
});
return packages;
},
« 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