Repository: ambari Updated Branches: refs/heads/trunk cc07fbe75 -> 0d056b714
AMBARI-5127 Job Tez DAG's vertices table not sorted by value. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0d056b71 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0d056b71 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0d056b71 Branch: refs/heads/trunk Commit: 0d056b714ec8a8acbd0d1b62cb2e6992685fa9f0 Parents: cc07fbe Author: atkach <[email protected]> Authored: Tue Mar 18 19:08:11 2014 +0200 Committer: atkach <[email protected]> Committed: Tue Mar 18 19:16:03 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/models/jobs/tez_dag.js | 19 +++++++++++++------ ambari-web/app/views/common/sort_view.js | 4 ++-- .../app/views/main/jobs/hive_job_details_view.js | 8 ++++---- 3 files changed, 19 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0d056b71/ambari-web/app/models/jobs/tez_dag.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/models/jobs/tez_dag.js b/ambari-web/app/models/jobs/tez_dag.js index bae96ab..d061049 100644 --- a/ambari-web/app/models/jobs/tez_dag.js +++ b/ambari-web/app/models/jobs/tez_dag.js @@ -137,17 +137,24 @@ App.TezDagVertex = DS.Model.extend({ recordReadCount : DS.attr('number'), recordWriteCount : DS.attr('number'), - totalReadBytesDisplay : function() { - return numberUtils.bytesToSize(this.get('fileReadBytes') + this.get('hdfsReadBytes')); + totalReadBytes : function() { + return this.get('fileReadBytes') + this.get('hdfsReadBytes'); }.property('fileReadBytes', 'hdfsReadBytes'), - totalWriteBytesDisplay : function() { - return numberUtils.bytesToSize(this.get('fileWriteBytes') + this.get('hdfsWriteBytes')); + totalWriteBytes : function() { + return this.get('fileWriteBytes') + this.get('hdfsWriteBytes'); }.property('fileWriteBytes', 'hdfsWriteBytes'), + totalReadBytesDisplay : function() { + return numberUtils.bytesToSize(this.get('totalReadBytes')); + }.property('totalReadBytes'), + + totalWriteBytesDisplay : function() { + return numberUtils.bytesToSize(this.get('totalWriteBytes')); + }.property('totalWriteBytes'), + durationDisplay : function() { - var duration = this.get('duration'); - return dateUtils.timingFormat(duration, true); + return dateUtils.timingFormat(this.get('duration'), true); }.property('duration') }); http://git-wip-us.apache.org/repos/asf/ambari/blob/0d056b71/ambari-web/app/views/common/sort_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/common/sort_view.js b/ambari-web/app/views/common/sort_view.js index 690d9d1..2110a98 100644 --- a/ambari-web/app/views/common/sort_view.js +++ b/ambari-web/app/views/common/sort_view.js @@ -134,7 +134,7 @@ var wrapperView = Em.View.extend({ func = function (a, b) { var a = misc.ipToInt(a.get(property.get('name'))); var b = misc.ipToInt(b.get(property.get('name'))); - if(order){ + if (order) { return b - a; } else { return a - b; @@ -145,7 +145,7 @@ var wrapperView = Em.View.extend({ func = function (a, b) { var a = parseFloat(a.get(property.get('name'))); var b = parseFloat(b.get(property.get('name'))); - if(order){ + if (order) { return b - a; } else { return a - b; http://git-wip-us.apache.org/repos/asf/ambari/blob/0d056b71/ambari-web/app/views/main/jobs/hive_job_details_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/jobs/hive_job_details_view.js b/ambari-web/app/views/main/jobs/hive_job_details_view.js index fa538d4..8afd59d 100644 --- a/ambari-web/app/views/main/jobs/hive_job_details_view.js +++ b/ambari-web/app/views/main/jobs/hive_job_details_view.js @@ -277,7 +277,7 @@ App.MainHiveJobDetailsVerticesTableView = App.TableView.extend({ didInsertElement: function () { if(!this.get('controller.sortingColumn')){ - var columns = this.get('childViews')[0].get('childViews') + var columns = this.get('childViews')[0].get('childViews'); if(columns && columns.findProperty('name', 'name')){ columns.findProperty('name','name').set('status', 'sorting_asc'); this.get('controller').set('sortingColumn', columns.findProperty('name','name')) @@ -299,19 +299,19 @@ App.MainHiveJobDetailsVerticesTableView = App.TableView.extend({ }), inputSort: sort.fieldView.extend({ column: 2, - name: 'totalReadBytesDisplay', + name: 'totalReadBytes', displayName: Em.I18n.t('apps.item.dag.input'), type: 'number' }), outputSort: sort.fieldView.extend({ column: 3, - name: 'totalWriteBytesDisplay', + name: 'totalWriteBytes', displayName: Em.I18n.t('apps.item.dag.output'), type: 'number' }), durationSort: sort.fieldView.extend({ column: 4, - name: 'durationDisplay', + name: 'duration', displayName: Em.I18n.t('apps.item.dag.duration'), type: 'number' })
