You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by ss...@apache.org on 2015/02/18 23:41:02 UTC
[15/23] tez git commit: TEZ-2116. Tez UI: dags page filter does not
work if more than one filter is specified. (Prakash Ramachandran via hitesh)
TEZ-2116. Tez UI: dags page filter does not work if more than one filter is specified. (Prakash Ramachandran via hitesh)
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/b756bc0d
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/b756bc0d
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/b756bc0d
Branch: refs/heads/TEZ-2003
Commit: b756bc0d406ac519de87d8c088c954e81c188ae6
Parents: dd44bde
Author: Hitesh Shah <hi...@apache.org>
Authored: Wed Feb 18 10:11:04 2015 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Wed Feb 18 10:11:04 2015 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../app/scripts/controllers/dags_controller.js | 4 ++--
.../app/scripts/mixins/paginated_content.js | 21 ++++++++++++++++++--
3 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/b756bc0d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index a566a37..ff3adc8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -64,6 +64,7 @@ Release 0.6.1: Unreleased
INCOMPATIBLE CHANGES
ALL CHANGES:
+ TEZ-2116. Tez UI: dags page filter does not work if more than one filter is specified.
TEZ-2106. TEZ UI: Display data load time, and add a refresh button for items that can be refreshed.
TEZ-2114. Tez UI: task/task attempt status is not available when its running.
TEZ-2112. Tez UI: fix offset calculation, add home button to breadcrumbs.
http://git-wip-us.apache.org/repos/asf/tez/blob/b756bc0d/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
index 880378a..c1aea73 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dags_controller.js
@@ -50,9 +50,9 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
loadData: function() {
var filters = {
primary: {
- user: this.user_filter,
+ dagName: this.dagName_filter,
applicationId: this.appId_filter,
- dagName: this.dagName_filter
+ user: this.user_filter
},
secondary: {
status: this.status_filter
http://git-wip-us.apache.org/repos/asf/tez/blob/b756bc0d/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js b/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
index 7b08036..f371f28 100644
--- a/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
+++ b/tez-ui/src/main/webapp/app/scripts/mixins/paginated_content.js
@@ -181,11 +181,28 @@ App.PaginatedContentMixin = Em.Mixin.create({
};
var f = this._paginationFilters;
- var primary = f.primary;
+ var primary = f.primary || {};
var secondary = f.secondary || {};
- primary = this._concatFilters(primary);
+ // TimelineRest API allows only one primaryFilter but any number of
+ // secondary filters. secondary filters are first checked in otherInfo
+ // field and then in primaryFilter field. this is tricky (for ex. when
+ // otherInfo and primaryFilter has same key). so we move all filters
+ // other than first non null primary to secondary.
+ var foundOnePrimaryFilter = false;
+ $.each(primary, function(name, value) {
+ if (!value) {
+ delete primary[name];
+ return true;
+ }
+ if (foundOnePrimaryFilter) {
+ secondary[name] = value;
+ delete primary[name];
+ }
+ foundOnePrimaryFilter = true;
+ });
+ primary = this._concatFilters(primary);
secondary = this._concatFilters(secondary);
if (!Em.empty(primary)) {