Browse Source

AMBARI-451. Add nodes has incorrect check on returned status (Contributed by Vikram)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/ambari-186@1347258 13f79535-47bb-0310-9956-ffa450edef68
Vikram Dixit K 13 years ago
parent
commit
a23791ed96
2 changed files with 5 additions and 3 deletions
  1. 2 0
      CHANGES.txt
  2. 3 3
      hmc/js/addNodes.js

+ 2 - 0
CHANGES.txt

@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-451. Add nodes has incorrect check on returned status (Vikram)
+
   AMBARI-450. Boldify/Redify restart HMC message when nagios/ganglia is on the hmc host (Yusaku via Vikram)
 
   AMBARI-449. Post cluster install/deploy the URL hmc/html/initializeCluster.php should be disabled (Yusaku via Vikram)

+ 3 - 3
hmc/js/addNodes.js

@@ -184,14 +184,14 @@ globalYui.one("#fileUploadTargetId").on('load', function (e) {
 
       var responseJson = globalYui.JSON.parse(responseText);
 
-      if (responseJson.result != "0") {
+      if (responseJson.result != 0) {
         // This means we hit an error
 
-        if (responseJson.result == "2") {
+        if (responseJson.result == 2) {
           alert('Got error : ' + responseJson.error);
           hideLoadingImg();
           return;
-      } else if (responseJson.result == "3") {
+      } else if (responseJson.result == 3) {
         var confirmed = confirm(responseJson.error + "\n\n" + responseJson.hosts + "\n\nPlease click OK if you want to ignore them and continue.");
         if (!confirmed) {
           hideLoadingImg();