Updated Branches: refs/heads/trunk e2d42ea27 -> 37793fcbc
AMBARI-2619. Wrong info on Services > Summary tab for DataNodes Live, TaskTrackers Live, RegionServers live. (Antonenko Aleksander via yusaku) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/37793fcb Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/37793fcb Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/37793fcb Branch: refs/heads/trunk Commit: 37793fcbc5fcf0dfd723194143acf5cb06fe1341 Parents: e2d42ea Author: Yusaku Sako <[email protected]> Authored: Wed Jul 10 11:15:44 2013 -0700 Committer: Yusaku Sako <[email protected]> Committed: Wed Jul 10 11:15:50 2013 -0700 ---------------------------------------------------------------------- ambari-web/app/templates/main/dashboard/service/hdfs.hbs | 2 +- ambari-web/app/views/main/dashboard/service/hbase.js | 4 ++-- ambari-web/app/views/main/dashboard/service/hdfs.js | 6 +++--- ambari-web/app/views/main/dashboard/service/mapreduce.js | 2 +- ambari-web/app/views/main/service/info/summary.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37793fcb/ambari-web/app/templates/main/dashboard/service/hdfs.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/dashboard/service/hdfs.hbs b/ambari-web/app/templates/main/dashboard/service/hdfs.hbs index 5284821..ec84e0b 100644 --- a/ambari-web/app/templates/main/dashboard/service/hdfs.hbs +++ b/ambari-web/app/templates/main/dashboard/service/hdfs.hbs @@ -48,7 +48,7 @@ <tr> <td>{{t dashboard.services.hdfs.datanodes}}</td> <td> - <span class="green-live">{{view.service.liveDataNodes.length}}/{{view.service.dataNodes.length}}</span> {{t services.service.summary.DataNodesLive}} + <span class="green-live">{{view.dataNodesLive.length}}/{{view.service.dataNodes.length}}</span> {{t services.service.summary.DataNodesLive}} <div class="summary-view-host"> <a href="#" {{action filterHosts view.dataNodeComponent}}>{{view.dataNodeHostText}}</a> </div> http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37793fcb/ambari-web/app/views/main/dashboard/service/hbase.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service/hbase.js b/ambari-web/app/views/main/dashboard/service/hbase.js index dd74664..af6c62b 100644 --- a/ambari-web/app/views/main/dashboard/service/hbase.js +++ b/ambari-web/app/views/main/dashboard/service/hbase.js @@ -39,8 +39,8 @@ App.MainDashboardServiceHbaseView = App.MainDashboardServiceView.extend({ liveRegionServes: function () { - return this.get('service.regionServers').filterProperty("healthClass","health-status-LIVE"); - }.property("service"), + return App.HostComponent.find().filterProperty('componentName', 'HBASE_REGIONSERVER').filterProperty("workStatus","STARTED"); + }.property(), regionServesText: function () { if(this.get('service.regionServers').get("length") > 1){ http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37793fcb/ambari-web/app/views/main/dashboard/service/hdfs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service/hdfs.js b/ambari-web/app/views/main/dashboard/service/hdfs.js index be47377..610a99f 100644 --- a/ambari-web/app/views/main/dashboard/service/hdfs.js +++ b/ambari-web/app/views/main/dashboard/service/hdfs.js @@ -37,16 +37,16 @@ App.MainDashboardServiceHdfsView = App.MainDashboardServiceView.extend({ }), dataNodesLive: function(){ - return this.get("service").get("dataNodes").filterProperty("healthClass", "health-status-LIVE").length; + return App.HostComponent.find().filterProperty('componentName', 'DATANODE').filterProperty("workStatus","STARTED"); }.property('service'), dataNodeHostText: function () { - if(this.get("dataNodesLive") > 1){ + if(this.get("service.dataNodes") > 1){ return Em.I18n.t('services.service.summary.viewHosts'); }else{ return Em.I18n.t('services.service.summary.viewHost'); } - }.property("dataNodesLive"), + }.property("service"), dfsTotalBlocks: function(){ return this.formatUnavailable(this.get('service.dfsTotalBlocks')); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37793fcb/ambari-web/app/views/main/dashboard/service/mapreduce.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/dashboard/service/mapreduce.js b/ambari-web/app/views/main/dashboard/service/mapreduce.js index 5cc5c02..fadb29c 100644 --- a/ambari-web/app/views/main/dashboard/service/mapreduce.js +++ b/ambari-web/app/views/main/dashboard/service/mapreduce.js @@ -65,7 +65,7 @@ App.MainDashboardServiceMapreduceView = App.MainDashboardServiceView.extend({ trackersSummary: function () { var svc = this.get('service'); - var liveCount = svc.get('aliveTrackers').get('length'); + var liveCount = App.HostComponent.find().filterProperty('componentName', 'TASKTRACKER').filterProperty("workStatus","STARTED").length; var totalCount = svc.get('taskTrackers').get('length'); var template = this.t('dashboard.services.mapreduce.trackersSummary'); return template.format(liveCount, totalCount); http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/37793fcb/ambari-web/app/views/main/service/info/summary.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/service/info/summary.js b/ambari-web/app/views/main/service/info/summary.js index 2645cfc..89fa365 100644 --- a/ambari-web/app/views/main/service/info/summary.js +++ b/ambari-web/app/views/main/service/info/summary.js @@ -133,7 +133,7 @@ App.MainServiceInfoSummaryView = Em.View.extend({ var monitors = service.get('hostComponents').filterProperty('isMaster', false); var liveMonitors = monitors.filterProperty("workStatus","STARTED").length; if (monitors.length) { - result = Em.I18n.t('services.service.info.summary.hostsRunningMonitor').format(monitors.length, liveMonitors); + result = Em.I18n.t('services.service.info.summary.hostsRunningMonitor').format(liveMonitors, monitors.length); } } return result;
