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

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

Issue 2361913002: Add custom filter to bot-list and task-list (Closed) Base URL: git@github.com:luci/luci-py@master
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/query-column-filter-behavior.html
diff --git a/appengine/swarming/elements/res/imp/common/query-column-filter-behavior.html b/appengine/swarming/elements/res/imp/common/query-column-filter-behavior.html
index c854b632e59b96403232a34d339d6f7d702baca1..bcf3a06d8c7275fe24fd4e4d156e8271a166876b 100644
--- a/appengine/swarming/elements/res/imp/common/query-column-filter-behavior.html
+++ b/appengine/swarming/elements/res/imp/common/query-column-filter-behavior.html
@@ -309,6 +309,21 @@
}
},
+ _manuallyAddFilter: function(){
+ var parts = this._query.trim().split(":");
+ if (parts.length != 2) {
+ sk.errorMessage('Invalid filter. Should be like "foo:bar"', 5000);
+ return;
+ }
+ var f = parts.join(":");
+ if (this._filters.indexOf(f) !== -1) {
+ sk.errorMessage('Filter "'+f+'" is already active', 5000);
+ return;
+ }
+ this.push("_filters", f);
+ this.set("_query", "");
+ },
+
_toggleColumn: function(e) {
var col = e.model.item;

Powered by Google App Engine
This is Rietveld 408576698