You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by hi...@apache.org on 2015/02/08 20:50:35 UTC
tez git commit: TEZ-2056. Tez UI: fix VertexID filter,
show only tez configs by default, fix appattemptid.
Repository: tez
Updated Branches:
refs/heads/master 2b5eeea52 -> 20bf31cd5
TEZ-2056. Tez UI: fix VertexID filter,show only tez configs by default,fix appattemptid.
Project: http://git-wip-us.apache.org/repos/asf/tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/tez/commit/20bf31cd
Tree: http://git-wip-us.apache.org/repos/asf/tez/tree/20bf31cd
Diff: http://git-wip-us.apache.org/repos/asf/tez/diff/20bf31cd
Branch: refs/heads/master
Commit: 20bf31cd560ff0f46d325cfdb70acb963bcbae1e
Parents: 2b5eeea
Author: Hitesh Shah <hi...@apache.org>
Authored: Sun Feb 8 11:50:20 2015 -0800
Committer: Hitesh Shah <hi...@apache.org>
Committed: Sun Feb 8 11:50:20 2015 -0800
----------------------------------------------------------------------
CHANGES.txt | 1 +
tez-ui/src/main/webapp/app/index.html | 1 +
.../webapp/app/scripts/components/kv-table.js | 32 ++++++++++++++++++--
.../webapp/app/scripts/controllers/dag_tasks.js | 20 +++++++-----
.../app/scripts/models/TimelineRestAdapter.js | 7 ++++-
tez-ui/src/main/webapp/app/styles/main.less | 6 ++++
.../app/templates/components/kv-table.hbs | 10 +++++-
.../webapp/app/templates/partials/configs.hbs | 2 +-
8 files changed, 67 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 584f49a..df94b54 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -57,6 +57,7 @@ Release 0.6.1: Unreleased
INCOMPATIBLE CHANGES
ALL CHANGES:
+ TEZ-2056. Tez UI: fix VertexID filter,show only tez configs by default,fix appattemptid.
TEZ-2052. Tez UI: log view fixes, show version from build, better handling of ats url config.
TEZ-2043. Tez UI: add progress info from am webservice to dag and vertex views.
TEZ-2032. Update CHANGES.txt to show 0.6.0 is released
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/tez-ui/src/main/webapp/app/index.html
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/index.html b/tez-ui/src/main/webapp/app/index.html
index 4fe7e3d..b2d1ac3 100644
--- a/tez-ui/src/main/webapp/app/index.html
+++ b/tez-ui/src/main/webapp/app/index.html
@@ -54,6 +54,7 @@
<script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-nav.min.js"></script>
<script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-items-action-bar.min.js"></script>
<script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-badge.min.js"></script>
+ <script src="bower_components/ember-addons.bs_for_ember/dist/js/bs-label.min.js"></script>
<script src="bower_components/antiscroll/antiscroll.js"></script>
<script src="bower_components/jquery-mousewheel/jquery.mousewheel.js"></script>
<script src="bower_components/ember-table/dist/ember-table.js"></script>
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/tez-ui/src/main/webapp/app/scripts/components/kv-table.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/components/kv-table.js b/tez-ui/src/main/webapp/app/scripts/components/kv-table.js
index 02beeea..5e433ea 100644
--- a/tez-ui/src/main/webapp/app/scripts/components/kv-table.js
+++ b/tez-ui/src/main/webapp/app/scripts/components/kv-table.js
@@ -19,13 +19,41 @@
App.KvTableComponent = Em.Component.extend({
layoutName: 'components/kv-table',
filterExp: null,
+ showAllButtonClass: '',
+ errorMsgClass: '',
+
+ actions: {
+ showAllButtonClicked: function() {
+ this.set('filterExp', null);
+ }
+ },
+
+ showError: function(show) {
+ this.set('errorMsgClass', show ? '' : 'no-display');
+ },
filteredKVs: function() {
+ var filterExp = this.get('filterExp');
var kvList = this.get('data') || [],
filteredKvs = [],
- filterStringRegex = new RegExp(this.filterExp, 'i');
+ filterStringRegex;
+
+ if (filterExp) {
+ this.set('showAllButtonClass', '');
+ } else {
+ this.set('showAllButtonClass', 'hidden');
+ }
+
+ try {
+ filterStringRegex = new RegExp(filterExp, 'i');
+ } catch(e) {
+ this.showError(true);
+ Em.Logger.debug("Invalid regex " + e);
+ return;
+ }
- if (Em.isEmpty(this.filterExp)) {
+ this.showError(false);
+ if (Em.isEmpty(filterExp)) {
return kvList;
}
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js b/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
index 019d29a..98958ae 100644
--- a/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
+++ b/tez-ui/src/main/webapp/app/scripts/controllers/dag_tasks.js
@@ -32,11 +32,15 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin, A
vertex_id_filter: null,
loadData: function() {
+ var primaryFilter;
+ if (!!this.vertex_id_filter) {
+ primaryFilter = { TEZ_VERTEX_ID : this.vertex_id_filter };
+ } else {
+ primaryFilter = { TEZ_DAG_ID : this.get('controllers.dag.id') };
+ }
+
var filters = {
- primary: {
- TEZ_DAG_ID: this.get('controllers.dag.id'),
- TEZ_VERTEX_ID: this.vertex_id_filter,
- },
+ primary: primaryFilter,
secondary: {
status: this.status_filter
}
@@ -49,14 +53,16 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin, A
store = this.get('store'),
fetcher;
childEntityType = this.get('childEntityType');
- var defaultErrMsg = 'Error while loading tasks. could not connect to %@'.fmt(App.env.timelineBaseUrl);
+ var defaultErrMsg = 'Error while loading tasks. could not connect to %@'
+ .fmt(App.env.timelineBaseUrl);
store.unloadAll(childEntityType);
store.findQuery(childEntityType, this.getFilterProperties()).then(function(entities){
that.set('entities', entities);
var pivotLoaders = [];
entities.forEach(function (task) {
- var taskAttemptId = task.get('successfulAttemptId') || task.get('attempts.lastObject');
+ var taskAttemptId = task.get('successfulAttemptId') ||
+ task.get('attempts.lastObject');
if (!!taskAttemptId) {
// Pivot attempt selection logic
fetcher = store.find('taskAttempt', taskAttemptId);
@@ -207,4 +213,4 @@ App.DagTasksController = Em.ObjectController.extend(App.PaginatedContentMixin, A
);
}.property(),
-});
\ No newline at end of file
+});
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
index d135174..6e84648 100644
--- a/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
+++ b/tez-ui/src/main/webapp/app/scripts/models/TimelineRestAdapter.js
@@ -461,7 +461,12 @@ App.OutputSerializer = App.TimelineSerializer.extend({
var timelineJsonToAppDetailMap = {
id: 'appId',
- attemptId: 'currentAppAttemptId',
+ attemptId: {
+ custom: function(source) {
+ // while an attempt is in progress the attempt id contains a '-'
+ return (Em.get(source, 'currentAppAttemptId') || '').replace('-','');
+ }
+ },
name: 'name',
queue: 'queue',
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/tez-ui/src/main/webapp/app/styles/main.less
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/styles/main.less b/tez-ui/src/main/webapp/app/styles/main.less
index 92536f8..1681f3d 100644
--- a/tez-ui/src/main/webapp/app/styles/main.less
+++ b/tez-ui/src/main/webapp/app/styles/main.less
@@ -410,6 +410,12 @@ div.indent {
font-weight: bold;
}
+ .input-wrapper {
+ display: block;
+ overflow: hidden;
+ padding: 4px 10px 4px 4px;
+ }
+
input[type=search] {
width: 100%;
}
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/tez-ui/src/main/webapp/app/templates/components/kv-table.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/components/kv-table.hbs b/tez-ui/src/main/webapp/app/templates/components/kv-table.hbs
index ae2ad17..bc359d8 100644
--- a/tez-ui/src/main/webapp/app/templates/components/kv-table.hbs
+++ b/tez-ui/src/main/webapp/app/templates/components/kv-table.hbs
@@ -24,7 +24,15 @@
</tr>
<tr>
<td class='filter' colspan='2'>
- {{input size='60' type='search' results='1' placeholder='Search...' valueBinding='filterExp'}}
+ <div>
+ {{bs-button title="showAll" size="small" class="align-right" clicked="showAllButtonClicked" classBinding="showAllButtonClass"}}
+ <span class="input-wrapper">
+ {{input size='60' type='search' results='1' placeholder='Search...' valueBinding='filterExp'}}
+ </span>
+ </div>
+ <div>
+ {{bs-label content="Invalid regex" type="warning" classBinding="errorMsgClass"}}
+ </div>
</td>
</tr>
<tbody>
http://git-wip-us.apache.org/repos/asf/tez/blob/20bf31cd/tez-ui/src/main/webapp/app/templates/partials/configs.hbs
----------------------------------------------------------------------
diff --git a/tez-ui/src/main/webapp/app/templates/partials/configs.hbs b/tez-ui/src/main/webapp/app/templates/partials/configs.hbs
index a639352..0e00ca5 100644
--- a/tez-ui/src/main/webapp/app/templates/partials/configs.hbs
+++ b/tez-ui/src/main/webapp/app/templates/partials/configs.hbs
@@ -18,7 +18,7 @@
{{#if configs}}
<div class='table-container'>
- {{kv-table-component data=configs}}
+ {{kv-table-component data=configs filterExp="^tez."}}
</div>
{{else}}
<div class='margin-small-horizontal'>