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

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

Issue 2553563003: Link Swarming Tasklist and Botlist together (Closed)
Patch Set: Rebuild Created 4 years 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/ui/res/imp/common/query-column-filter-behavior.html
diff --git a/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html b/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
index b05ec97e7aa97ca92510fff2f57c4674f282cb04..bb42009460131333308389171e8adf28e903d26d 100644
--- a/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
+++ b/appengine/swarming/ui/res/imp/common/query-column-filter-behavior.html
@@ -341,17 +341,24 @@
},
_manuallyAddFilter: function(){
- var parts = this._query.trim().split(":");
- if (parts.length != 2) {
+ var filter = this._query.trim();
+ var idx = filter.indexOf(this.FILTER_SEP);
+ if (idx === -1) {
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);
+ var primary = filter.slice(0, idx);
+ var param = filter.slice(idx + this.FILTER_SEP.length);
+ if (swarming.alias.DIMENSIONS_WITH_ALIASES.indexOf(primary) !== -1) {
+ param = swarming.alias.apply(param, primary);
+ }
+ filter = primary + this.FILTER_SEP + param;
+
+ if (this._filters.indexOf(filter) !== -1) {
+ sk.errorMessage('Filter "'+filter+'" is already active', 5000);
return;
}
- this.push("_filters", f);
+ this.push("_filters", filter);
this.set("_query", "");
},
« no previous file with comments | « appengine/swarming/ui/res/imp/common/common-behavior.html ('k') | appengine/swarming/ui/res/imp/tasklist/task-filters.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698