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

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

Issue 2337363004: Add task-page (Closed) Base URL: git@github.com:luci/luci-py@task-data
Patch Set: Alignment take 2 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/tasklist/task-filters.html
diff --git a/appengine/swarming/elements/res/imp/tasklist/task-filters.html b/appengine/swarming/elements/res/imp/tasklist/task-filters.html
index 846db0d136949872583dad7c774c2583201e7905..174f1bbc548ea0bb117ba4b052f03ac4a7181a4f 100644
--- a/appengine/swarming/elements/res/imp/tasklist/task-filters.html
+++ b/appengine/swarming/elements/res/imp/tasklist/task-filters.html
@@ -31,6 +31,7 @@
<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/task-behavior.html">
<link rel="import" href="/res/imp/common/url-param.html">
<dom-module id="task-filters">
@@ -156,29 +157,33 @@
var filterMap = {
state: function(task, s) {
var state = this._attribute(task, "state")[0];
- if (s === state) {
+ if (s === state || s === "ALL") {
return true;
}
if (s === "PENDING_RUNNING") {
- return state === "PENDING" || state === "RUNNING";
+ return state === this.PENDING || state === this.RUNNING;
}
var failure = this._attribute(task, "failure", false)[0];
if (s === "COMPLETED_SUCCESS") {
- return state === "COMPLETED" && !failure;
+ return state === this.COMPLETED && !failure;
}
if (s === "COMPLETED_FAILURE") {
- return state === "COMPLETED" && failure;
+ return state === this.COMPLETED && failure;
}
var tryNum = this._attribute(task, "try_number", "-1")[0];
if (s === "DEDUPED") {
- return state === "COMPLETED" && tryNum === "0";
+ return state === this.COMPLETED && tryNum === "0";
}
},
};
+
Polymer({
is: 'task-filters',
- behaviors: [SwarmingBehaviors.QueryColumnFilter],
+ behaviors: [
+ SwarmingBehaviors.QueryColumnFilter,
+ SwarmingBehaviors.TaskBehavior,
+ ],
properties: {
// output

Powered by Google App Engine
This is Rietveld 408576698