Chromium Code Reviews| Index: appengine/swarming/ui/res/imp/botlist/bot-filters.html |
| diff --git a/appengine/swarming/ui/res/imp/botlist/bot-filters.html b/appengine/swarming/ui/res/imp/botlist/bot-filters.html |
| index 699f7fc18e56647e3cad412964751905fe36e221..dd54fdf093a374a4319aa5f0b6267edcc4d32bf0 100644 |
| --- a/appengine/swarming/ui/res/imp/botlist/bot-filters.html |
| +++ b/appengine/swarming/ui/res/imp/botlist/bot-filters.html |
| @@ -57,15 +57,15 @@ |
| <link rel="import" href="/res/imp/bower_components/paper-icon-button/paper-icon-button.html"> |
| <link rel="import" href="/res/imp/bower_components/paper-input/paper-input.html"> |
| -<link rel="import" href="/res/imp/common/url-param.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/url-param.html"> |
| <link rel="import" href="bot-list-shared-behavior.html"> |
| <dom-module id="bot-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"> |
| </style> |
| @@ -172,7 +172,7 @@ the fleet."> |
| </div> |
| <div class="side-by-side"> |
| - <paper-checkbox checked="{{verbose}}">Verbose Entries</paper-checkbox> |
| + <paper-checkbox checked="{{verbose}}">Verbose Entries</paper-checkbox> |
| <paper-input id="_limit" |
| label="Limit Results" |
| auto-validate |
| @@ -181,6 +181,7 @@ the fleet."> |
| pattern="[0-9]+" |
| value="{{_limit}}"> |
| </paper-input> |
| + <a href$="[[_matchingTasksLink(query_params)]]">View Matching Tasks</a> |
| </div> |
| </div> |
| @@ -303,6 +304,21 @@ the fleet."> |
| return params; |
| }, |
| + _matchingTasksLink: function(queryParams) { |
|
jcgregorio
2016/12/06 18:51:54
Use query_params to be consistent.
kjlubick
2016/12/06 20:05:27
Done.
|
| + var cols = ["name", "state", "created_ts"]; |
|
stephana
2016/12/06 18:43:39
Are these constants local to this function not use
kjlubick
2016/12/06 18:50:32
These are just the default columns I want to displ
|
| + if (!queryParams.dimensions) { |
| + return this._taskListLink([], cols); |
| + } |
| + |
| + queryParams.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._taskListLink(queryParams.dimensions, cols); |
| + }, |
| + |
| _showDimensionMessage: function(primarySelected, selectedItems) { |
| return primarySelected && primarySelected !== "id" && !selectedItems; |
| } |