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

Unified Diff: appengine/swarming/elements/res/imp/tasklist/task-list.html

Issue 2258853002: Midway through extracting filters (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@tasklist
Patch Set: Revert gpu stuff and tidy up Created 4 years, 4 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/tasklist/task-list.html
diff --git a/appengine/swarming/elements/res/imp/tasklist/task-list.html b/appengine/swarming/elements/res/imp/tasklist/task-list.html
index e906360f1591c901f458811d46606fa924acf996..4108280c9fe64cafb43aefcb74599e1002098d53 100644
--- a/appengine/swarming/elements/res/imp/tasklist/task-list.html
+++ b/appengine/swarming/elements/res/imp/tasklist/task-list.html
@@ -64,12 +64,16 @@
auth_headers="[[_auth_headers]]"
query_params="[[_query_params]]"
tasks="{{_items}}"
- busy="{{_busy}}">
+ busy="{{_busy}}"
+ primary_map="{{_primary_map}}"
+ primary_arr="{{_primary_arr}}">
</task-list-data>
<div class="horizontal layout">
<task-filters
+ primary_map="[[_primary_map]]"
+ primary_arr="[[_primary_arr]]"
columns="{{_columns}}"
query_params="{{_query_params}}"
filter="{{_filter}}"
@@ -101,7 +105,7 @@
not of much use, so we'll ignore it in _hide() and use this._columns.
-->
<th hidden$="[[_hide('state', _columns.*)]]">
- <span>Status</span>
+ <span>State</span>
<sort-toggle
name="state"
current="[[_sort]]">
@@ -173,6 +177,9 @@
Polymer({
is: 'task-list',
+
+ // The order behaviors are applied in matters - later ones overwrite
+ // attributes of earlier ones
behaviors: [
SwarmingBehaviors.SwarmingBehavior,
SwarmingBehaviors.DynamicTableBehavior,
@@ -186,7 +193,13 @@
// For dynamic table.
_columnMap: {
type: Object,
- value: columnMap,
+ value: function() {
+ var base = this._commonColumns();
+ for (var attr in columnMap) {
+ base[attr] = columnMap[attr];
+ }
+ return base;
+ },
},
_headerMap: {
type: Object,
@@ -203,13 +216,20 @@
},
_attribute: function(task, col, def) {
- var retVal = task[col] || [def];
+ var retVal = this._tag(task, col) || task[col] || [def];
if (!Array.isArray(retVal)) {
return [retVal];
}
return retVal;
},
+ _tag: function(task, col) {
+ if (!task || !task.tagMap) {
+ return undefined;
+ }
+ return task.tagMap[col];
+ },
+
_taskLink: function(task) {
// TODO(kjlubick) Make this point to /newui/ when appropriate.
return "/restricted/task/"+task.task_id;

Powered by Google App Engine
This is Rietveld 408576698