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

Unified Diff: appengine/swarming/elements/res/imp/common/common-behavior.html

Issue 2350853004: Make the buttons on task-page work (Closed) Base URL: git@github.com:luci/luci-py@task-page2
Patch Set: Rebuild 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/common/common-behavior.html
diff --git a/appengine/swarming/elements/res/imp/common/common-behavior.html b/appengine/swarming/elements/res/imp/common/common-behavior.html
index 3481d34e92b0515fdd030c6b33bfb4193be886f1..757ff251e25ff22a4a51a237a8bfe2006fe1acb8 100644
--- a/appengine/swarming/elements/res/imp/common/common-behavior.html
+++ b/appengine/swarming/elements/res/imp/common/common-behavior.html
@@ -29,6 +29,23 @@
return "/newui/bot?id=" + bot_id;
},
+ // Create a link to a bot list with the preloaded filters and columns.
+ // filters should be an array of {key:String, value:String} and
+ // columns should be an array of Strings.
+ _botListLink: function(filters, columns) {
+ filters = filters || [];
+ columns = columns || [];
+ var fArr = [];
+ filters.forEach(function(f){
+ fArr.push(f.key + ":" + f.value);
+ });
+ var obj = {
+ filters: fArr,
+ columns: columns,
+ }
+ return "/newui/botlist?" + sk.query.fromParamSet(obj);
+ },
+
// _getJsonAsync makes an XHR to a url, parses the response as JSON
// and sticks the resulting object into the property with the name given
// by "bindTo". If busy is defined, the property with that name will be

Powered by Google App Engine
This is Rietveld 408576698