Pārlūkot izejas kodu

AMBARI-2619. Wrong info on Services > Summary tab for DataNodes Live, TaskTrackers Live, RegionServers live. (Antonenko Aleksander via yusaku)

Yusaku Sako 12 gadi atpakaļ
vecāks
revīzija
37793fcbc5

+ 1 - 1
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>

+ 2 - 2
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){

+ 3 - 3
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'));

+ 1 - 1
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);

+ 1 - 1
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;