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

Unified Diff: appengine/swarming/elements/res/imp/botpage/bot-page-data.html

Issue 2306103002: Add aliases to bot-page and refactor duplicated code (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@fix-buttons
Patch Set: rebase again Created 4 years, 3 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
Index: appengine/swarming/elements/res/imp/botpage/bot-page-data.html
diff --git a/appengine/swarming/elements/res/imp/botpage/bot-page-data.html b/appengine/swarming/elements/res/imp/botpage/bot-page-data.html
index e5c421c9c2b08677e7ce186ac3f8c9943fbfa2a7..b333d1b5dda5eaa726af1108f3226948f3689529 100644
--- a/appengine/swarming/elements/res/imp/botpage/bot-page-data.html
+++ b/appengine/swarming/elements/res/imp/botpage/bot-page-data.html
@@ -172,6 +172,15 @@
});
}
+ bot.dimensions = bot.dimensions || [];
+ bot.dimensions.forEach(function(dim) {
+ if (swarming.alias.DIMENSIONS_WITH_ALIASES.indexOf(dim.key) !== -1) {
+ dim.value.forEach(function(value, i){
+ dim.value[i] = swarming.alias.apply(value, dim.key);
+ });
+ }
+ });
+
BOT_TIMES.forEach(function(time) {
if (bot[time]) {
bot[time] = new Date(bot[time]);

Powered by Google App Engine
This is Rietveld 408576698