فهرست منبع

AMBARI-530. HMC UI shows undefined for nodes after single node install (Contributed by Yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/ambari-186@1347200 13f79535-47bb-0310-9956-ffa450edef68
Vikram Dixit K 13 سال پیش
والد
کامیت
0069f90ee1
2فایلهای تغییر یافته به همراه19 افزوده شده و 11 حذف شده
  1. 2 0
      CHANGES.txt
  2. 17 11
      hmc/js/clustersList.js

+ 2 - 0
CHANGES.txt

@@ -6,6 +6,8 @@ characters wide.
 
 
 Release 0.1.x - unreleased
 Release 0.1.x - unreleased
 
 
+  AMBARI-530. HMC UI shows undefined for nodes after single node install (Yusaku via Vikram)
+
   AMBARI-532. add ganglia monitor to all masters (Mahadev via Vikram)
   AMBARI-532. add ganglia monitor to all masters (Mahadev via Vikram)
 
 
   AMBARI-407. add more logging and timing info for various actions (Hitesh via Vikram)
   AMBARI-407. add more logging and timing info for various actions (Hitesh via Vikram)

+ 17 - 11
hmc/js/clustersList.js

@@ -9,12 +9,15 @@ function populateHostToMasterRoleMapping(clusterServices, hostMap) {
 
 
         globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
         globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
           if (serviceComponent.isMaster) {
           if (serviceComponent.isMaster) {
-            // just add the client to the hostname object
-            if ( !( serviceComponent.hostName in hostMap ) ) {
-              hostMap[serviceComponent.hostName] = new Array();
-              hostMap[serviceComponent.hostName].push({ serviceName: serviceComponent.displayName, isMaster: true });
-            } else {
-              hostMap[serviceComponent.hostName].push({ serviceName: serviceComponent.displayName, isMaster: true});
+            // just add the master to the hostname object
+            for (var i in serviceComponent.hostNames) {
+              var hostName = serviceComponent.hostNames[i];
+              if ( !( hostName in hostMap ) ) {
+                hostMap[hostName] = new Array();
+                hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: true });
+              } else {
+                hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: true });
+              }
             }
             }
           }
           }
         });
         });
@@ -34,11 +37,14 @@ function populateHostToClientRoleMapping(clusterServices, hostMap) {
         globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {          
         globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {          
           if (serviceComponent.isClient) {
           if (serviceComponent.isClient) {
             // just add the client to the hostname object
             // just add the client to the hostname object
-            if ( !( serviceComponent.hostName in hostMap ) ) {
-              hostMap[serviceComponent.hostName] = new Array();
-              hostMap[serviceComponent.hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
-            } else {
-              hostMap[serviceComponent.hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
+            for (var i in serviceComponent.hostNames) {
+              var hostName = serviceComponent.hostNames[i];
+              if ( !( hostName in hostMap ) ) {
+                hostMap[hostName] = new Array();
+                hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
+              } else {
+                hostMap[hostName].push({ serviceName: serviceComponent.displayName, isMaster: false });
+              }
             }
             }
           }
           }
         });
         });