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

Unified Diff: appengine/swarming/ui/res/imp/tasklist/task-filters.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/tasklist/task-filters.html
diff --git a/appengine/swarming/ui/res/imp/tasklist/task-filters.html b/appengine/swarming/ui/res/imp/tasklist/task-filters.html
index e49cf7205b3b8a5f147451b04fed77e6b22e2eed..66b9e6c7c4346cfcf20c5984a8cafe33ff390435 100644
--- a/appengine/swarming/ui/res/imp/tasklist/task-filters.html
+++ b/appengine/swarming/ui/res/imp/tasklist/task-filters.html
@@ -33,12 +33,13 @@
<link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html">
<link rel="import" href="/res/imp/common/query-column-filter-behavior.html">
+<link rel="import" href="/res/imp/common/swarming-app.html">
<link rel="import" href="/res/imp/common/task-behavior.html">
<link rel="import" href="/res/imp/common/url-param.html">
<dom-module id="task-filters">
<template>
- <style is="custom-style" include="iron-flex iron-flex-alignment iron-positioning query-column-filter-style">
+ <style is="custom-style" include="iron-flex iron-flex-alignment iron-positioning query-column-filter-style swarming-app-style">
.item.wide {
max-width: 400px;
}
@@ -153,6 +154,7 @@
pattern="[0-9]+"
value="{{_limit}}">
</paper-input>
+ <a href$="[[_matchingBotsLink(query_params,dimensions.*)]]">View Matching Bots</a>
</div>
</div>
@@ -257,6 +259,26 @@
return params;
},
+ _matchingBotsLink: function(queryParams) {
+ var cols = ["id", "os", "task", "status"];
+ if (!queryParams.tags || !this.dimensions) {
+ return this._botListLink([], cols);
+ }
+
+ var dimensions = queryParams.tags.filter(function(t){
+ var col = t.split(this.FILTER_SEP, 1)[0];
+ return this.dimensions.indexOf(col) !== -1;
+ }.bind(this));
+
+ dimensions.forEach(function(f) {
+ var col = f.split(this.FILTER_SEP, 1)[0];
+ if (cols.indexOf(col) === -1) {
+ cols.push(col);
+ }
+ }.bind(this));
+ return this._botListLink(dimensions, cols);
+ },
+
_showTagMessage: function(primarySelected, selectedItems) {
return primarySelected && primarySelected !== "name" && !selectedItems;
}

Powered by Google App Engine
This is Rietveld 408576698