浏览代码

AMBARI-468. Post-Install Add Nodes - update progress title and success/error messages to reflect what it's actually doing/has done (Contributed by Yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/ambari-186@1347290 13f79535-47bb-0310-9956-ffa450edef68
Vikram Dixit K 13 年之前
父节点
当前提交
078b156a6e

+ 2 - 0
CHANGES.txt

@@ -6,6 +6,8 @@ characters wide.
 
 
 Release 0.1.x - unreleased
 Release 0.1.x - unreleased
 
 
+  AMBARI-468. Post-Install Add Nodes - update progress title and success/error messages to reflect what it's actually doing/has done (Yusaku via Vikram)
+
   AMBARI-472. Add api to find all unassigned hosts in a cluster (Hitesh via Vikram)
   AMBARI-472. Add api to find all unassigned hosts in a cluster (Hitesh via Vikram)
 
 
   AMBARI-470. Fix conflicting dashbord conf files in installer and dashboard. (Mahadev via Vikram)
   AMBARI-470. Fix conflicting dashbord conf files in installer and dashboard. (Mahadev via Vikram)

+ 5 - 2
hmc/css/common.css

@@ -522,7 +522,7 @@ div.separator {
   clear:both;  
   clear:both;  
 }
 }
 #txnProgressBox ul label {
 #txnProgressBox ul label {
-  width:140px;
+  width:150px;
   float:left;
   float:left;
   margin-right:8px;
   margin-right:8px;
 }
 }
@@ -635,4 +635,7 @@ div.separator {
   height:12px;
   height:12px;
   float:left;
   float:left;
 }
 }
-/* END progress popup styles */
+/* END progress popup styles */
+#deployAddedNodesSubmitButtonId {
+  margin-left:20px; 
+}

+ 2 - 2
hmc/html/addNodesWizard.php

@@ -37,7 +37,7 @@
                 <span class="installationWizardStageNumber">
                 <span class="installationWizardStageNumber">
                   2   
                   2   
                 </span>
                 </span>
-                Select services
+                Install Services
               </div>
               </div>
             </li>
             </li>
           </ol>
           </ol>
@@ -131,7 +131,7 @@
         '../js/addNodes.js', 
         '../js/addNodes.js', 
         '../js/addNodesProgress.js', 
         '../js/addNodesProgress.js', 
         '../js/selectComponents.js', 
         '../js/selectComponents.js', 
-        '../js/deployProgress.js', 
+        '../js/deployAddedNodesProgress.js', 
         '../js/addNodesWizardInit.js'
         '../js/addNodesWizardInit.js'
       ];
       ];
     </script>
     </script>

+ 1 - 0
hmc/html/subnav.htmli

@@ -1,5 +1,6 @@
 <?php
 <?php
 switch ($requestPage) {
 switch ($requestPage) {
+case 'html':
 case 'index.php':
 case 'index.php':
   $activeTab = 'SUMMARY';
   $activeTab = 'SUMMARY';
   break;
   break;

+ 3 - 2
hmc/js/selectComponents.js

@@ -98,7 +98,8 @@ globalYui.one('#deployAddedNodesSubmitButtonId').on('click',function (e) {
     e.target.set('disabled', true);
     e.target.set('disabled', true);
 
 
     var deployRequestData = getSelectedComponents();
     var deployRequestData = getSelectedComponents();
-
+    var deployAddedNodes = new DeployAddedNodes();
+    
     globalYui.io("../php/frontend/deployAddedNodes.php?clusterName="+ InstallationWizard.SelectServicesForNewNodes.renderData.clusterName, {
     globalYui.io("../php/frontend/deployAddedNodes.php?clusterName="+ InstallationWizard.SelectServicesForNewNodes.renderData.clusterName, {
       method: 'POST',
       method: 'POST',
       data: globalYui.JSON.stringify(deployRequestData),
       data: globalYui.JSON.stringify(deployRequestData),
@@ -125,7 +126,7 @@ globalYui.one('#deployAddedNodesSubmitButtonId').on('click',function (e) {
           globalYui.log("PARSED DATA: " + globalYui.Lang.dump(deployProgressInfoJson));
           globalYui.log("PARSED DATA: " + globalYui.Lang.dump(deployProgressInfoJson));
 
 
           /* Done with this stage, transition to the next. */
           /* Done with this stage, transition to the next. */
-          transitionToNextStage( "#selectServicesCoreDivId", deployRequestData, "#txnProgressCoreDivId", deployProgressInfoJson, renderDeployProgress );
+          transitionToNextStage( "#selectServicesCoreDivId", deployRequestData, "#txnProgressCoreDivId", deployProgressInfoJson, deployAddedNodes.renderProgress);
 
 
           /* At this point, our users are done with the installation wizard
           /* At this point, our users are done with the installation wizard
           * and have asked for a deploy, so there's no going back - remove
           * and have asked for a deploy, so there's no going back - remove

+ 1 - 1
hmc/js/selectServices.js

@@ -215,7 +215,7 @@ function updateRendering() {
 function displayStatusOnSelectDeselectAll(selectAll, setFormStatusAlso) {
 function displayStatusOnSelectDeselectAll(selectAll, setFormStatusAlso) {
   var labelNode = globalYui.one("#labelForSelectAllId");
   var labelNode = globalYui.one("#labelForSelectAllId");
   if (selectAll) {
   if (selectAll) {
-    labelNode.setContent("Deselect all");
+    labelNode.setContent("Select all");
   } else {
   } else {
     labelNode.setContent("Select all");
     labelNode.setContent("Select all");
   }
   }

+ 3 - 3
hmc/php/conf/MessageResources-en.inc

@@ -48,9 +48,9 @@ $RES['initWizard.reviewAndDeploy.submit.label']='Deploy';
 $RES['addNodesWizard.addNodes.pageSummary.header']="Which nodes are you adding to the cluster?";
 $RES['addNodesWizard.addNodes.pageSummary.header']="Which nodes are you adding to the cluster?";
 $RES['addNodesWizard.addNodes.pageSummary.body']="We'll use the SSH private key and a file containing a list of hostnames to perform installation on your nodes.  The public key that is paired with the private key must already be installed on all the nodes.";
 $RES['addNodesWizard.addNodes.pageSummary.body']="We'll use the SSH private key and a file containing a list of hostnames to perform installation on your nodes.  The public key that is paired with the private key must already be installed on all the nodes.";
 $RES['addNodesWizard.addNodes.submit.label']="Add Nodes";
 $RES['addNodesWizard.addNodes.submit.label']="Add Nodes";
-$RES['addNodesWizard.selectServices.pageSummary.header']='Which services do you want to install?';
-$RES['addNodesWizard.selectServices.pageSummary.body']="Some services will be installed by default.";
-$RES['addNodesWizard.selectServices.submit.label']="Deploy";
+$RES['addNodesWizard.selectServices.pageSummary.header']='Install Services';
+$RES['addNodesWizard.selectServices.pageSummary.body']="Select the services that you wish to install on your nodes.  Note that some services are selected by default and cannot be deselected.";
+$RES['addNodesWizard.selectServices.submit.label']="Proceed";
 $RES['uninstallWizard.pageSummary.header']="Uninstall Cluster";
 $RES['uninstallWizard.pageSummary.header']="Uninstall Cluster";
 $RES['uninstallWizard.pageSummary.body']="<span class='label label-important'>Warning</span>  Proceed with caution!  This will delete all services from all of your nodes in the cluster (and all of your data, if you choose the <i>wipe out</i> option).";
 $RES['uninstallWizard.pageSummary.body']="<span class='label label-important'>Warning</span>  Proceed with caution!  This will delete all services from all of your nodes in the cluster (and all of your data, if you choose the <i>wipe out</i> option).";
 $RES['uninstallWizard.wipeout.label']="Perform wipe out (delete all data)";
 $RES['uninstallWizard.wipeout.label']="Perform wipe out (delete all data)";

+ 7 - 7
hmc/php/orchestrator/Cluster.php

@@ -50,7 +50,7 @@ class Cluster {
    * @param transaction transactionId for the operation
    * @param transaction transactionId for the operation
    */
    */
   public function deployHDP($transaction) {
   public function deployHDP($transaction) {
-    $this->currentAction = "INSTALL";
+    $this->currentAction = "Cluster install";
     $result = $this->_deployHDP($transaction, TRUE);
     $result = $this->_deployHDP($transaction, TRUE);
     if ($result['result'] !== 0) {
     if ($result['result'] !== 0) {
       return $result;
       return $result;
@@ -209,7 +209,7 @@ class Cluster {
    * @param transaction transactionId for the operation
    * @param transaction transactionId for the operation
    */
    */
   public function uninstallHDP($transaction, $wipeoutData = FALSE) {
   public function uninstallHDP($transaction, $wipeoutData = FALSE) {
-    $this->currentAction = "Uninstall";
+    $this->currentAction = "Cluster uninstall";
     $this->logger->log_info("Uninstalling HDP, wipeoutDataFlag="
     $this->logger->log_info("Uninstalling HDP, wipeoutDataFlag="
         . $wipeoutData);
         . $wipeoutData);
 
 
@@ -315,7 +315,7 @@ class Cluster {
 
 
   private function _restartDashboardAndNagios($transaction, $dryRun,
   private function _restartDashboardAndNagios($transaction, $dryRun,
       $restartNagiosOnly = FALSE) {
       $restartNagiosOnly = FALSE) {
-    $this->currentAction = "Nagios/Ganglia Reconfiguration";
+    $this->currentAction = "Reconfigure Nagios/Ganglia";
     $this->logger->log_info("Restarting dashboard and nagios, dryRun=" . $dryRun);
     $this->logger->log_info("Restarting dashboard and nagios, dryRun=" . $dryRun);
 
 
     // check if nagios installed and needs to be restarted
     // check if nagios installed and needs to be restarted
@@ -402,7 +402,7 @@ class Cluster {
 
 
   private function _installNodes($transaction, $hostCompMapping, $dryRun) {
   private function _installNodes($transaction, $hostCompMapping, $dryRun) {
     $this->logger->log_info("Installing on nodes dryRun=" . $dryRun);
     $this->logger->log_info("Installing on nodes dryRun=" . $dryRun);
-    $this->currentAction = "Install Nodes";
+    $this->currentAction = "Install nodes";
     $hostsToInstall = array();
     $hostsToInstall = array();
     $allHosts = array();
     $allHosts = array();
     $compMapping = array();
     $compMapping = array();
@@ -488,7 +488,7 @@ class Cluster {
   private function _startNodes($transaction, $hostCompMapping, $dryRun) {
   private function _startNodes($transaction, $hostCompMapping, $dryRun) {
     $this->logger->log_info("Starting nodes dryRun=" . $dryRun);
     $this->logger->log_info("Starting nodes dryRun=" . $dryRun);
 
 
-    $this->currentAction = "Start Nodes";
+    $this->currentAction = "Start nodes";
     $hostsToStart = array();
     $hostsToStart = array();
     $kickHosts = array();
     $kickHosts = array();
     $noOpHosts = array();
     $noOpHosts = array();
@@ -1020,10 +1020,10 @@ class Cluster {
   private function setState($state, $transaction, $dryRun) {
   private function setState($state, $transaction, $dryRun) {
     $txnProgress = getTransactionProgressFromState($state);
     $txnProgress = getTransactionProgressFromState($state);
 //  $desc = "CLUSTER"."-".$this->currentAction."-". TransactionProgress::$PROGRESS[$txnProgress];
 //  $desc = "CLUSTER"."-".$this->currentAction."-". TransactionProgress::$PROGRESS[$txnProgress];
-    $desc = getActionDescription("Cluster", $this->currentAction, TransactionProgress::$PROGRESS[$txnProgress]);
+    $desc = getActionDescription("", $this->currentAction, TransactionProgress::$PROGRESS[$txnProgress]);
     if ($dryRun) {
     if ($dryRun) {
 //      $desc = "CLUSTER"."-".$this->currentAction."-PENDING";
 //      $desc = "CLUSTER"."-".$this->currentAction."-PENDING";
-      $desc = getActionDescription("Cluster", $this->currentAction, "PENDING");
+      $desc = getActionDescription("", $this->currentAction, "PENDING");
     }
     }
     $result =
     $result =
       $this->db->persistTransaction($transaction, State::$STATE[$state],
       $this->db->persistTransaction($transaction, State::$STATE[$state],

+ 6 - 6
hmc/php/orchestrator/Service.php

@@ -137,7 +137,7 @@ class Service {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function uninstall($transaction, $dryRun) {
   public function uninstall($transaction, $dryRun) {
-    $this->currentAction = "UNINSTALL";
+    $this->currentAction = "uninstall";
 
 
     // Check if it's already INSTALLED or STARTED
     // Check if it's already INSTALLED or STARTED
     if ($this->state === State::UNINSTALLED) {
     if ($this->state === State::UNINSTALLED) {
@@ -182,7 +182,7 @@ class Service {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function install($transaction, $dryRun) {
   public function install($transaction, $dryRun) {
-    $this->currentAction = "INSTALL";
+    $this->currentAction = "install";
 
 
     // set flag to ensure smoke tests are run for client-only services
     // set flag to ensure smoke tests are run for client-only services
     // as we just installed or re-configured something
     // as we just installed or re-configured something
@@ -268,7 +268,7 @@ class Service {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function start($transaction, $dryRun) {
   public function start($transaction, $dryRun) {
-    $this->currentAction = "START";
+    $this->currentAction = "start";
 
 
     $result = $this->getComponents($transaction);
     $result = $this->getComponents($transaction);
     if ($result["result"] !== 0) {
     if ($result["result"] !== 0) {
@@ -363,7 +363,7 @@ class Service {
     if ($dryRun) {
     if ($dryRun) {
       $txnProgress = TransactionProgress::PENDING;
       $txnProgress = TransactionProgress::PENDING;
     }
     }
-    $desc = getActionDescription($this->displayName, "SMOKE TEST",
+    $desc = getActionDescription($this->displayName, "smoke test",
         TransactionProgress::$PROGRESS[$txnProgress]);
         TransactionProgress::$PROGRESS[$txnProgress]);
 
 
     $result =
     $result =
@@ -385,7 +385,7 @@ class Service {
   }
   }
 
 
   public function smoke($transaction, $dryRun) {
   public function smoke($transaction, $dryRun) {
-    $this->currentAction = "SMOKETEST";
+    $this->currentAction = "smoke test";
 
 
     $this->checkIsClientOnly();
     $this->checkIsClientOnly();
     if ($this->isClientOnly
     if ($this->isClientOnly
@@ -490,7 +490,7 @@ class Service {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function stop($transaction, $dryRun) {
   public function stop($transaction, $dryRun) {
-    $this->currentAction = "STOP";
+    $this->currentAction = "stop";
 
 
     $result = $this->getComponents($transaction);
     $result = $this->getComponents($transaction);
     if ($result["result"] !== 0) {
     if ($result["result"] !== 0) {

+ 4 - 4
hmc/php/orchestrator/ServiceComponent.php

@@ -125,7 +125,7 @@ class ServiceComponent {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function uninstall($transaction, $dryRun) {
   public function uninstall($transaction, $dryRun) {
-    $this->currentAction = "UNINSTALL";
+    $this->currentAction = "uninstall";
 
 
     // Check if it's already UNINSTALLED
     // Check if it's already UNINSTALLED
     if ($this->state === State::UNINSTALLED) {
     if ($this->state === State::UNINSTALLED) {
@@ -149,7 +149,7 @@ class ServiceComponent {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function install($transaction, $dryRun) {
   public function install($transaction, $dryRun) {
-    $this->currentAction = "INSTALL";
+    $this->currentAction = "install";
 
 
     // Check if it's already INSTALLED
     // Check if it's already INSTALLED
     if ($this->state === State::INSTALLED) {
     if ($this->state === State::INSTALLED) {
@@ -187,7 +187,7 @@ class ServiceComponent {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function start($transaction, $dryRun) {
   public function start($transaction, $dryRun) {
-    $this->currentAction = "START";
+    $this->currentAction = "start";
 
 
     if ($this->isClient) {
     if ($this->isClient) {
       // no-op for clients
       // no-op for clients
@@ -306,7 +306,7 @@ class ServiceComponent {
    *   array( "result" => 0, "error" => msg)
    *   array( "result" => 0, "error" => msg)
    */
    */
   public function stop($transaction, $dryRun) {
   public function stop($transaction, $dryRun) {
-    $this->currentAction = "STOP";
+    $this->currentAction = "stop";
 
 
     if ($this->isClient) {
     if ($this->isClient) {
       // no-op for clients
       // no-op for clients

+ 1 - 1
hmc/php/orchestrator/State.php

@@ -168,7 +168,7 @@ function getActionDescription($name, $action, $state) {
   }
   }
   $description = $name . " " . strtolower($action) . " " . strtolower($stateInfo);
   $description = $name . " " . strtolower($action) . " " . strtolower($stateInfo);
   */
   */
-  $description = $name.' '.strtolower($action);
+  $description = $name.' '.$action;
   return $description;
   return $description;
 }
 }
 ?>
 ?>