You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by sr...@apache.org on 2015/06/10 15:22:38 UTC
tez git commit: TEZ-2513. Tez UI: Allow filtering by DAG ID on All
dags table.
Repository: tez
Updated Branches:
refs/heads/master 26c3c7934 -> 0588c144f
TEZ-2513. Tez UI: Allow filtering by DAG ID on All dags table.
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/0588c144
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/0588c144
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/0588c144
Branch: refs/heads/master
Commit: 0588c144f6e7c6f53b7fd0954bd0e25dbca7493b
Parents: 26c3c79
Author: Sreenath Somarajapuram <so...@gmail.com>
Authored: Wed Jun 10 18:51:42 2015 +0530
Committer: Sreenath Somarajapuram <so...@gmail.com>
Committed: Wed Jun 10 18:51:42 2015 +0530
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../app/scripts/controllers/dags_controller.js | 26 ++++++++++++++++++--
tez-ui/src/main/webapp/app/templates/dags.hbs | 10 ++++++++
3 files changed, 35 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/0588c144/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 62d07cb..0f2c3a5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -36,6 +36,7 @@ Release 0.7.1: Unreleased
INCOMPATIBLE CHANGES
ALL CHANGES:
+ TEZ-2513. Tez UI: Allow filtering by DAG ID on All dags table.
TEZ-2541. DAGClientImpl enable TimelineClient check is wrong.
TEZ-2539. Tez UI: Pages are not updating in IE.
TEZ-2535. Tez UI: Failed task attempts link in vertex details page is broken.
http://git-wip-us.apache.org/repos/asf/tez/blob/0588c144/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 2cc092c..9746906 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
@@ -31,6 +31,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
status_filter: 'status',
user_filter: 'user',
appId_filter: 'appid',
+ id_filter: 'id',
dagName_filter: 'dag_name'
},
@@ -39,6 +40,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
status_filter: null,
user_filter: null,
appId_filter: null,
+ id_filter: null,
dagName_filter: null,
boundFilterValues: Em.Object.create({
@@ -56,9 +58,10 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
status: this.get('status_filter'),
user: this.get('user_filter'),
appId: this.get('appId_filter'),
+ id: this.get('id_filter'),
dagName: this.get('dagName_filter')
}));
- }.observes('status_filter', 'user_filter', 'appId_filter', 'dagName_filter'),
+ }.observes('status_filter', 'user_filter', 'appId_filter', 'dagName_filter', 'id_filter'),
_filterVisiblilityObserver: function () {
var visibleFilters = Em.Object.create();
@@ -92,6 +95,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
var that = this,
store = this.get('store'),
childEntityType = this.get('childEntityType'),
+ finder,
record;
var defaultErrMsg = 'Error while loading dag info.';
@@ -99,7 +103,23 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
store.unloadAll(childEntityType);
store.unloadAll('dagProgress');
- store.findQuery(childEntityType, this.getFilterProperties()).then(function(entities){
+ if(this.id_filter) {
+ finder = store.find(childEntityType, this.id_filter).then(function (entity) {
+ return (
+ (that.dagName_filter && entity.get('name') != that.dagName_filter) ||
+ (that.appId_filter && entity.get('applicationId') != that.appId_filter) ||
+ (that.user_filter && entity.get('user') != that.user_filter) ||
+ (that.status_filter && entity.get('status') != that.status_filter)
+ ) ? [] : [entity];
+ }).catch(function () {
+ return [];
+ });
+ }
+ else {
+ finder = store.findQuery(childEntityType, this.getFilterProperties());
+ }
+
+ finder.then(function(entities){
that.set('entities', entities);
that.set('loading', false);
@@ -160,6 +180,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
status_filter: filterValues.get('status') || null,
user_filter: filterValues.get('user') || null,
appId_filter: filterValues.get('appId') || null,
+ id_filter: filterValues.get('id') || null,
dagName_filter: filterValues.get('dagName') || null,
});
this.loadData();
@@ -208,6 +229,7 @@ App.DagsController = Em.ObjectController.extend(App.PaginatedContentMixin, App.C
{
id: 'id',
headerCellName: 'Id',
+ enableFilter: true,
contentPath: 'id'
},
{
http://git-wip-us.apache.org/repos/asf/tez/blob/0588c144/tez-ui/src/main/webapp/app/templates/dags.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/dags.hbs b/tez-ui/src/main/webapp/app/templates/dags.hbs
index 0f272c5..350a688 100644
--- a/tez-ui/src/main/webapp/app/templates/dags.hbs
+++ b/tez-ui/src/main/webapp/app/templates/dags.hbs
@@ -39,6 +39,16 @@
}}
</div>
{{/if}}
+ {{#if visibleFilters.id}}
+ <div class='filter-elements'>
+ <div>Id</div>
+ {{input
+ action="filterUpdated"
+ value=boundFilterValues.id
+ placeholder="Search..."
+ }}
+ </div>
+ {{/if}}
{{#if visibleFilters.user}}
<div class='filter-elements'>
<div>Submitter</div>