You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/07 01:15:33 UTC

svn commit: r1347200 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/js/clustersList.js

Author: vikram
Date: Wed Jun  6 23:15:33 2012
New Revision: 1347200

URL: http://svn.apache.org/viewvc?rev=1347200&view=rev
Log:
AMBARI-530. HMC UI shows undefined for nodes after single node install  (Contributed by Yusaku)

Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/js/clustersList.js

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347200&r1=1347199&r2=1347200&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Wed Jun  6 23:15:33 2012
@@ -6,6 +6,8 @@ characters wide.
 
 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-407. add more logging and timing info for various actions (Hitesh via Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/js/clustersList.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/clustersList.js?rev=1347200&r1=1347199&r2=1347200&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/clustersList.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/clustersList.js Wed Jun  6 23:15:33 2012
@@ -9,12 +9,15 @@ function populateHostToMasterRoleMapping
 
         globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
           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
         globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {          
           if (serviceComponent.isClient) {
             // 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 });
+              }
             }
           }
         });