incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vik...@apache.org
Subject svn commit: r1347241 - in /incubator/ambari/branches/ambari-186: CHANGES.txt hmc/html/head.inc hmc/html/uninstallFailed.php hmc/php/conf/MessageResources-en.inc
Date Thu, 07 Jun 2012 01:01:57 GMT
Author: vikram
Date: Thu Jun  7 01:01:56 2012
New Revision: 1347241

URL: http://svn.apache.org/viewvc?rev=1347241&view=rev
Log:
AMBARI-437. Update router to handle resuming uninstall progress and uninstall failed pages
(Contributed by Yusaku)

Added:
    incubator/ambari/branches/ambari-186/hmc/html/uninstallFailed.php
Modified:
    incubator/ambari/branches/ambari-186/CHANGES.txt
    incubator/ambari/branches/ambari-186/hmc/html/head.inc
    incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc

Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347241&r1=1347240&r2=1347241&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun  7 01:01:56 2012
@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-437. Update router to handle resuming uninstall progress and uninstall failed pages
(Yusaku via Vikram)
+
   AMBARI-436. Support Resume For Uninstall (Varun via Vikram)
 
   AMBARI-435. Uninstall needs to update status for failure. (Vikram)

Modified: incubator/ambari/branches/ambari-186/hmc/html/head.inc
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/head.inc?rev=1347241&r1=1347240&r2=1347241&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/head.inc (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/head.inc Thu Jun  7 01:01:56 2012
@@ -24,6 +24,10 @@ $logger = new HMCLogger("Interceptor");
 $db = new HMCDBAccessor($GLOBALS["DB_PATH"]);
 $appDir = "/hmc/html";
 
+/* If bypassRouter parameter is 1, don't do any routing */
+
+$bypassRouter = (isset($_GET['bypassRouter']) && $_GET['bypassRouter']);
+
 $res = $db->getAllClusters();
 $clusters = $res['clusters'];
 $requestPage = basename(preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']));
@@ -45,7 +49,7 @@ if (sizeof($clusters) == 0) {
         if ($state['context']['status']) {
           $clusterState = 'OPERATIONAL';
         } else {
-          if ($requestPage != 'installFailed.php' && $requestPage != 'uninstallWizard.php')
{
+          if (!$bypassRouter && $requestPage != 'installFailed.php' && $requestPage
!= 'uninstallWizard.php') {
             eval(redirectToPage($requestPage, 'installFailed.php'));
             exit; 
           }
@@ -53,19 +57,33 @@ if (sizeof($clusters) == 0) {
         }
         break;
       case 'CONFIGURATION_IN_PROGRESS':
-        if ($requestPage != 'reinstall.php' && $requestPage != 'initializeCluster.php')
{
+        if (!$bypassRouter && $requestPage != 'reinstall.php' && $requestPage
!= 'initializeCluster.php') {
           eval(redirectToPage($requestPage, 'reinstall.php'));
           exit;
         }
         $clusterState = 'CONFIGURATION_IN_PROGRESS';
         break;      
       case 'DEPLOYMENT_IN_PROGRESS':
-        if ($requestPage != 'showDeployProgress.php') {
+        if (!$bypassRouter && $requestPage != 'showDeployProgress.php') {
           eval(redirectToPage($requestPage, 'showDeployProgress.php'));
           exit;
         }     
         $clusterState = 'DEPLOYMENT_IN_PROGRESS';
         break;
+      case 'UNINSTALLATION_IN_PROGRESS':
+        if (!$bypassRouter && $requestPage != 'showUninstallProgress.php') {
+          eval(redirectToPage($requestPage, 'showUninstallProgress.php'));
+          exit;
+        }     
+        $clusterState = 'UNINSTALLATION_IN_PROGRESS';
+        break;
+      case 'UNINSTALLED':
+        if (!$bypassRouter && $requestPage != 'uninstallFailed.php') {
+          eval(redirectToPage($requestPage, 'uninstallFailed.php'));
+          exit;
+        }
+        $clusterState = 'UNINSTALL_FAILED';
+        break;        
     } 
   }  
 }

Added: incubator/ambari/branches/ambari-186/hmc/html/uninstallFailed.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/uninstallFailed.php?rev=1347241&view=auto
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/uninstallFailed.php (added)
+++ incubator/ambari/branches/ambari-186/hmc/html/uninstallFailed.php Thu Jun  7 01:01:56
2012
@@ -0,0 +1,30 @@
+<?php require_once "./head.inc" ?>
+<html>
+  <head>
+    <title id="pageTitleId"><?php echo $RES['page.title'] ?></title>
+
+    <!-- CSS -->
+    <link type="text/css" rel="stylesheet" href="../yui-3.5.1/build/cssreset/cssreset-min.css">

+    <link type="text/css" rel="stylesheet" href="../css/bootstrap.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/common3.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/selectHosts.css" media="screen"/>
+    <link rel="shortcut icon" href="../images/logo-micro.gif">
+    <!-- End CSS -->
+  </head>
+  <body class="yui3-skin-sam">
+    <?php require "./topnav.htmli"; ?>
+    <div id="ContentDivId"> 
+      <div class="container">
+        <div class="alert alert-important" style="margin-top:40px;padding:20px">
+          <h2 style="margin-bottom:10px"><?php echo $RES['uninstallFailed.header']
?></h2>
+          <p><?php echo $RES['uninstallFailed.body'] ?></p>
+          <?php /*
+          <a id="submitLinkId" class="btn btn-large" style="margin-top:20px" href="uninstallWizard.php?clusterName=<?php
echo $clusterName ?>"><?php echo $RES['uninstallFailed.submit.label'] ?></a>
+          */ ?>          
+        </div>
+      </div>
+    </div>
+  </body>
+</html>
\ No newline at end of file

Modified: incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc?rev=1347241&r1=1347240&r2=1347241&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc Thu Jun  7 01:01:56
2012
@@ -12,6 +12,8 @@ $RES['installFailed.submit.label']="Star
 $RES['reinstall.header']="You have not set up a cluster yet.";
 $RES['reinstall.body']="We'll walk you through setting up your cluster with a 7-step wizard.";
 $RES['reinstall.submit.label']="Let's get started!";
+$RES['uninstallFailed.header']="Cluster uninstallation failed";
+$RES['uninstallFailed.body']="Failed to uninstall the cluster.  (REFERENCE MATERIAL FOR MANUAL
UNINSTALL PROCEDURE HERE)";
 $RES['common.sshUsername.label']="SSH Username";
 $RES['common.sshPrivateKeyFile.label']="SSH Private Key File";
 $RES['common.hostsFile.label']="Hosts File (newline-delimited list of hostnames)";



Mime
View raw message