incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1363205 - in /incubator/ambari/branches/branch-0.9: CHANGES.txt hmc/html/manageServices.php hmc/js/configureServicesUtils.js hmc/js/utils.js hmc/php/frontend/manageServices.php
Date Thu, 19 Jul 2012 02:03:06 GMT
Author: yusaku
Date: Thu Jul 19 02:03:06 2012
New Revision: 1363205

URL: http://svn.apache.org/viewvc?rev=1363205&view=rev
Log:
AMBARI-650. Issues with Reconfigure Service (Contributed by yusaku)

Modified:
    incubator/ambari/branches/branch-0.9/CHANGES.txt
    incubator/ambari/branches/branch-0.9/hmc/html/manageServices.php
    incubator/ambari/branches/branch-0.9/hmc/js/configureServicesUtils.js
    incubator/ambari/branches/branch-0.9/hmc/js/utils.js
    incubator/ambari/branches/branch-0.9/hmc/php/frontend/manageServices.php

Modified: incubator/ambari/branches/branch-0.9/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-0.9/CHANGES.txt?rev=1363205&r1=1363204&r2=1363205&view=diff
==============================================================================
--- incubator/ambari/branches/branch-0.9/CHANGES.txt (original)
+++ incubator/ambari/branches/branch-0.9/CHANGES.txt Thu Jul 19 02:03:06 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.9.0 - unreleased
 
+  AMBARI-650. Issues with Reconfigure Service (yusaku)
+
   AMBARI-639. Monitoring Dashboard does not show the Help Link in the top
   nav and a link to Apache 2.0 license and NOTICE file in the footer
   (yusaku) 

Modified: incubator/ambari/branches/branch-0.9/hmc/html/manageServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-0.9/hmc/html/manageServices.php?rev=1363205&r1=1363204&r2=1363205&view=diff
==============================================================================
--- incubator/ambari/branches/branch-0.9/hmc/html/manageServices.php (original)
+++ incubator/ambari/branches/branch-0.9/hmc/html/manageServices.php Thu Jul 19 02:03:06 2012
@@ -22,6 +22,7 @@
 <html>
   <head>
     <?php require "./head.htmli" ?>
+    <script src="/hmc/js/ext/jquery.min.js"></script>
   </head>
 
   <body class="yui3-skin-sam">

Modified: incubator/ambari/branches/branch-0.9/hmc/js/configureServicesUtils.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-0.9/hmc/js/configureServicesUtils.js?rev=1363205&r1=1363204&r2=1363205&view=diff
==============================================================================
--- incubator/ambari/branches/branch-0.9/hmc/js/configureServicesUtils.js (original)
+++ incubator/ambari/branches/branch-0.9/hmc/js/configureServicesUtils.js Thu Jul 19 02:03:06
2012
@@ -305,18 +305,22 @@ function ConfigureServicesUtil() {
     
       this.setErrorReason('#' + propKey, errorReason);
     }
-    
-    var firstServiceName = null;
-    // show error counts in the tab for each service that had errors
-    for (serviceName in errorCounts) {
-      if (firstServiceName === null) {
-        firstServiceName = serviceName;
+
+    // if this is being invoked from cluster install wizard, update tabs with error counts.
+    // else this is being invoked from reconfigure services so there are no tabs to update.
+    var tabs = $('#configureServicesTabs');
+    if (tabs.length > 0) {
+      var firstServiceName = null;
+      // show error counts in the tab for each service that had errors
+      for (serviceName in errorCounts) {
+        if (firstServiceName === null) {
+          firstServiceName = serviceName;
+        }
+        this.updateServiceErrorCount(serviceName, errorCounts[serviceName]);
       }
-      this.updateServiceErrorCount(serviceName, errorCounts[serviceName]);
+      // open the first tab that has an error
+      tabs.find('a[href="#' + firstServiceName + '"]').tab('show');
     }
-    // open the first tab that has an error
-    $('#configureServicesTabs a[href="#' + firstServiceName + '"]').tab('show');
-    
     Y.one('#formStatusDivId').scrollIntoView();
     
   }.bind(this);

Modified: incubator/ambari/branches/branch-0.9/hmc/js/utils.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-0.9/hmc/js/utils.js?rev=1363205&r1=1363204&r2=1363205&view=diff
==============================================================================
--- incubator/ambari/branches/branch-0.9/hmc/js/utils.js (original)
+++ incubator/ambari/branches/branch-0.9/hmc/js/utils.js Thu Jul 19 02:03:06 2012
@@ -141,7 +141,6 @@ function transitionToNextStage( currentS
 function clearFormStatus() {
   var formStatusDiv = globalYui.all("#formStatusDivId");
   // formStatusDiv.setContent("");
-  formStatusDiv.setStyle("visibility", "hidden");
   formStatusDiv.hide();
   formStatusDiv.set('className','');
   formStatusDiv.addClass("formStatusBar");
@@ -155,7 +154,6 @@ function setFormStatus(statusString, isE
     formStatusDivCssClass = 'statusOk';
   }
   var formStatusDiv = globalYui.all("#formStatusDivId");
-  formStatusDiv.setStyle("visibility", "visible");
   formStatusDiv.show();
   formStatusDiv.set('className','');
   formStatusDiv.addClass("formStatusBar");

Modified: incubator/ambari/branches/branch-0.9/hmc/php/frontend/manageServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-0.9/hmc/php/frontend/manageServices.php?rev=1363205&r1=1363204&r2=1363205&view=diff
==============================================================================
--- incubator/ambari/branches/branch-0.9/hmc/php/frontend/manageServices.php (original)
+++ incubator/ambari/branches/branch-0.9/hmc/php/frontend/manageServices.php Thu Jul 19 02:03:06
2012
@@ -80,7 +80,8 @@ function performServiceManagement( $hmc,
          * accordingly before attempting to call $hmc->reconfigureServices().
          */
         // re-using persistConfigs code
-        $serviceManagementResult = validateAndPersistConfigsFromUser($dbAccessor, $logger,
$clusterName, $requestObj['services']);
+        $finalProperties = sanitizeConfigs($requestObj['services'], $logger);
+        $serviceManagementResult = validateAndPersistConfigsFromUser($dbAccessor, $logger,
$clusterName, $finalProperties);
         if ($serviceManagementResult['result'] != 0) {
           $logger->log_error("Failed to validate configs from user, error=" . $serviceManagementResult["error"]);
           return $serviceManagementResult;



Mime
View raw message