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

svn commit: r1358041 [1/3] - in /incubator/ambari/trunk: ./ hmc/css/ hmc/html/ hmc/html/upgradeStack/ hmc/js/ hmc/js/ext/ hmc/js/upgradeStack/ hmc/php/conf/ hmc/php/frontend/ hmc/php/util/

Author: yusaku
Date: Fri Jul  6 04:46:36 2012
New Revision: 1358041

URL: http://svn.apache.org/viewvc?rev=1358041&view=rev
Log:
AMBARI-605. Add UI flow/groundwork for handling Ambari / Hadoop stack version upgrades (Contributed by yusaku)

Added:
    incubator/ambari/trunk/hmc/html/_bootstrapJs.php
      - copied, changed from r1357334, incubator/ambari/trunk/hmc/html/bootstrapJs.htmli
    incubator/ambari/trunk/hmc/html/_footer.php
      - copied unchanged from r1357334, incubator/ambari/trunk/hmc/html/footer.htmli
    incubator/ambari/trunk/hmc/html/_head.php
      - copied, changed from r1357334, incubator/ambari/trunk/hmc/html/head.htmli
    incubator/ambari/trunk/hmc/html/_router.php
      - copied, changed from r1357334, incubator/ambari/trunk/hmc/html/head.inc
    incubator/ambari/trunk/hmc/html/_subnav.php
      - copied unchanged from r1357334, incubator/ambari/trunk/hmc/html/subnav.htmli
    incubator/ambari/trunk/hmc/html/_topnav.php
      - copied, changed from r1357334, incubator/ambari/trunk/hmc/html/topnav.htmli
    incubator/ambari/trunk/hmc/html/_txnUtils.php
      - copied unchanged from r1357334, incubator/ambari/trunk/hmc/html/txnUtils.htmli
    incubator/ambari/trunk/hmc/html/_utils.php
      - copied, changed from r1357334, incubator/ambari/trunk/hmc/html/utils.htmli
    incubator/ambari/trunk/hmc/html/upgradeStack/
    incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php
    incubator/ambari/trunk/hmc/html/upgradeStack/deploy.php
    incubator/ambari/trunk/hmc/html/upgradeStack/index.php
    incubator/ambari/trunk/hmc/html/upgradeStack/reconfigure.php
    incubator/ambari/trunk/hmc/html/upgradeStack/uninstall.php
    incubator/ambari/trunk/hmc/js/ext/sinon.min.js
    incubator/ambari/trunk/hmc/js/upgradeStack/
    incubator/ambari/trunk/hmc/js/upgradeStack/deploy.js
    incubator/ambari/trunk/hmc/js/upgradeStack/reconfigure.js
    incubator/ambari/trunk/hmc/js/upgradeStack/uninstall.js
Removed:
    incubator/ambari/trunk/hmc/html/bootstrapJs.htmli
    incubator/ambari/trunk/hmc/html/footer.htmli
    incubator/ambari/trunk/hmc/html/head.htmli
    incubator/ambari/trunk/hmc/html/head.inc
    incubator/ambari/trunk/hmc/html/reinstall.php
    incubator/ambari/trunk/hmc/html/subnav.htmli
    incubator/ambari/trunk/hmc/html/topnav.htmli
    incubator/ambari/trunk/hmc/html/txnUtils.htmli
    incubator/ambari/trunk/hmc/html/utils.htmli
    incubator/ambari/trunk/hmc/html/welcome.inc
Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/NOTICE.txt
    incubator/ambari/trunk/hmc/css/app.css
    incubator/ambari/trunk/hmc/html/addNodesWizard.php
    incubator/ambari/trunk/hmc/html/index.php
    incubator/ambari/trunk/hmc/html/initializeCluster.php
    incubator/ambari/trunk/hmc/html/installFailed.php
    incubator/ambari/trunk/hmc/html/manageServices.php
    incubator/ambari/trunk/hmc/html/showDeployAddedNodesProgress.php
    incubator/ambari/trunk/hmc/html/showDeployProgress.php
    incubator/ambari/trunk/hmc/html/showManageServicesProgress.php
    incubator/ambari/trunk/hmc/html/showUninstallProgress.php
    incubator/ambari/trunk/hmc/html/uninstallFailed.php
    incubator/ambari/trunk/hmc/html/uninstallWizard.php
    incubator/ambari/trunk/hmc/html/welcome.php
    incubator/ambari/trunk/hmc/js/assignMasters.js
    incubator/ambari/trunk/hmc/js/clustersList.js
    incubator/ambari/trunk/hmc/js/configureServices.js
    incubator/ambari/trunk/hmc/js/configureServicesUtils.js
    incubator/ambari/trunk/hmc/js/deployProgress.js
    incubator/ambari/trunk/hmc/js/manageServices.js
    incubator/ambari/trunk/hmc/js/txnUtils.js
    incubator/ambari/trunk/hmc/js/utils.js
    incubator/ambari/trunk/hmc/php/conf/Config.inc
    incubator/ambari/trunk/hmc/php/conf/MessageResources-en.inc
    incubator/ambari/trunk/hmc/php/frontend/configUtils.php
    incubator/ambari/trunk/hmc/php/util/selectNodes.php

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Jul  6 04:46:36 2012
@@ -6,6 +6,9 @@ characters wide.
 
 Release 1.0.0 - unreleased
 
+  AMBARI-605. Add UI flow/groundwork for handling Ambari / Hadoop stack version
+  upgrades (yusaku) 
+
   AMBARI-600. Fix lzo installs to work correctly on RHEL6 (hitesh)
 
   AMBARI-598. Set state to UNKNOWN and not 0 to avoid issues when using === matches

Modified: incubator/ambari/trunk/NOTICE.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/NOTICE.txt?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/NOTICE.txt (original)
+++ incubator/ambari/trunk/NOTICE.txt Fri Jul  6 04:46:36 2012
@@ -17,3 +17,6 @@ Copyright (c) 2007-2012 jQuery Grid Plug
 
 This product includes raphael (http://raphaeljs.com/)
 Copyright (c) 2008 Dmitry Baranovskiy
+
+This product includes Sinon.JS (http://sinonjs.org - BSD license)
+Copyright (c) 2010 - 2012, Christian Johansen.

Modified: incubator/ambari/trunk/hmc/css/app.css
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/css/app.css?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/css/app.css (original)
+++ incubator/ambari/trunk/hmc/css/app.css Fri Jul  6 04:46:36 2012
@@ -23,13 +23,6 @@ header, footer, aside, nav, article, sec
   display: block;
 }
 
-header {
-	margin:10px 0;
-  height:100px;
-  background-color:white;
-  font-size:300%;
-}
-
 body { 
   font:13px/1.231 Helvetica,Arial,sans-serif;
   *font-size:small; 
@@ -47,26 +40,16 @@ h1 {
   text-align: center; 
 }
 
-header img {
-        height:93px;
-        width:241px;
-	float:left;
-}
-#headerText {
-        font-weight:bold;
-        padding:30px 0 0 400px;
-}
-
 footer {
 	border-top:1px solid #e5e5e5;
 	padding:40px 0;
 	background-color:#fff;
-    color:#666666;
+  color:#666666;
 }
 
 footer a:link, footer a:visited {
-    color:#666666;
-    text-decoration:underline;
+  color:#666666;
+  text-decoration:underline;
 }
 
 a:link {
@@ -151,13 +134,6 @@ table {
   border:1px solid #DBDBDB;
 }
 
-caption {
-  font-weight:bold;
-  font-size:1.3em;
-  padding:10px;
-  color:green;
-}
-
 thead {
   font-size:13px;
   font-weight:bold;
@@ -229,7 +205,7 @@ td {
   margin:0 auto;
 }
 
-#ContentDivId {
+#content {
   width:980px;
   margin:0 auto;
   padding:0;
@@ -301,7 +277,11 @@ label.unit {
 }
 
 a.btn {
-	color:#333;
+	color: #333;
+}
+
+a.btn-success {
+  color: #fff;
 }
 
 .btn-large .iconic-stop:before {
@@ -422,13 +402,14 @@ div.separator {
 #serviceLegend {
   float:right;
 }
-#clusterHostRoleMappingDivId {
-  margin-top:20px;
-  width:500px;
-  margin-left:20px;
+#clusterHostRoleMapping {
+  margin-top: 20px;
+  width: 500px;
+  margin-left: 20px;
+  float: left;
 }
 
-#clusterHostRoleMappingDivId h2 {
+#clusterHostRoleMapping h2 {
   font-size:16px;
   float:left;
   margin-bottom:10px;
@@ -661,38 +642,6 @@ legend {
   text-align:left;
 }
 
-.submitButton:hover {
-  background-color:#00CC00;
-  cursor:pointer;
-  border:1px solid green;
-  color:white;
-}
-
-.submitButton {
-  -moz-box-shadow:inset 0px 1px 20px -2px #caefab;
-  -webkit-box-shadow:inset 0px 1px 20px -2px #caefab;
-  box-shadow:inset 0px 1px 20px -2px #caefab;
-  background-color: #39E639;
-  -moz-border-radius:6px;
-  -webkit-border-radius:6px;
-  border-radius:6px;
-  border:1px solid grey;
-  color:black;
-  margin-top:6px;
-  margin-bottom:6px;
-  font-family:Arial;
-  font-size:14px;
-  font-weight:bold;
-  padding:6px 20px;
-  text-decoration:none;
-  float:right;
-}
-
-.submitButton:active {
-  position:relative;
-  top:1px;
-}
-
 input[readonly] {
   width:300px;
   /*
@@ -704,9 +653,6 @@ input[readonly] {
   vertical-align:top;
 }
 
-#formElement {
-  height: 35px;
-}
 /* END common2 */
 /* BEGIN common3 */
 span.installationWizardStageNumber {
@@ -806,7 +752,6 @@ span.installationWizardStageNumber {
 #txnProgressStatusDivId {
   width: auto;
   max-width:500px;
-  /-*height: 2em;*-/
   border-style: solid;
   border-width: 2px;
   border-radius:2px;
@@ -831,13 +776,6 @@ span.installationWizardStageNumber {
     text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
 }
 
-.formStatusBarZeroOpacity {
-  visibility: hidden;
-  opacity: 0;
-  transition: visibility 0s 5s, opacity 3s linear;
-  -moz-transition: visibility 0s 5s, opacity 3s linear;
-}
-
 #txnProgressCoreDivId {
   /* Float above all else*/
   z-index:15;
@@ -1021,7 +959,6 @@ span.installationWizardStageNumber {
 
 #informationalPanelContainerDivId .yui3-widget-ft .yui3-button:active {
   background-color: #e6e6e6;
-  background-color: #d9d9d9 \9;
   background-image: none;
   outline: 0;
   -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
@@ -1088,12 +1025,6 @@ span.installationWizardStageNumber {
   margin: auto;
 }
 
-.centered {
-  position: fixed; 
-  left: 50%; 
-  top: 50%;
-}
-
 #configureClusterInputContainerDivId {
   float:left;
   width:400px;
@@ -1144,181 +1075,11 @@ span.installationWizardStageNumber {
     margin-left: 320px;
 }
 /* END common3 */
-/* BEGIN selectHosts */
-#serviceMastersLinksDivId {
-  width:40%;
-  float:left;
-}
-
-.aServiceMasterLink {
-  display:block;
-  border: 1px solid #B2B299;
-  clear:left;
-  float: left;
-  width:100%;
-  height:35px;
-  background-color: #DBDBDB;
-  color:white;
-  margin-bottom:15px;
-}
-
-.aServiceMasterLinkVisited {
-  display:block;
-  border: 1px solid #B2B299;
-  clear:left;
-  float: left;
-  width:100%;
-  height:35px;
-  background-color: green;
-  color:white;
-  margin-bottom:15px;
-  font-weight:bold;
-}
-
-#nodeGroupsCoreDivId {
-  border: 1px solid #B2B299;
-  float:left;
-  width:100%;
-}
-
-#nodeListDynamicId {
-  border: 1px solid #B2B299;
-  text-align:center;
-  /* display:inline-block; */
-}
-
-#nodeGroupsTable {
-  margin:5px;
-  overflow:auto;
-}
-
-.nodeGroupTitle {
-  font-weight:bold;
-  font-size:1.2em;
-  padding:5px;
-  background-color:#B2B299;
-  color:white;
-}
-
-.nodeList {
-  display:block;
-  margin:5px;
-  width:40%;
-  margin-left:50%;
-}
-
-.aNodeGroup {
-  /*overflow:auto;*/
-  padding:10px;
-  width:500px;
-  float:left;
-}
-
-.slotBucket {
-  margin:5px;
-  display:block;
-  float:left;
-}
-
-.slotTitle {
-  display:block;
-}
-
-.slot {
-  border: 1px solid #B2B299;
-  min-height:50px;
-
-  /* Color transition */
-  transition: background-color 1s cubic-bezier(.09, .99, .37, .98);
-  -moz-transition: background-color 1s cubic-bezier(.09, .99, .37, .98);    /* FF3.7+ */
-  -o-transition: background-color 1s cubic-bezier(.09, .99, .37, .98) ;      /* Opera 10.5 */
-  -webkit-transition: background-color 1s cubic-bezier(.09, .99, .37, .98) ; /* Saf3.2+, Chrome */
-}
-
-.slotHover {
-  border: 1px solid #B2B299;
-  min-height:50px;
- /* background-color: #00CC00; */
-  background-color:#F0F0E8;
-}
-
-.yui3-dd-drop-over {
- /* background-color: #00CC00; */
-  background-color:#F0F0E8;
-}
-
-.masterDiv {
-  border:1px solid green;
-  margin:3px;
-  padding:10px;
-  cursor:move;
-  /* background-color: #00CC00; */
-  background-color:#65B642;
-  border-radius:4px 4px 4px 4px;
-  color:white;
-  font-weight:bold;
-  width:180px;
-}
 
 #selectServiceMastersSubmitButtonId {
   clear:both;
 }
 
-.nodeAssignmentWrapper {
-  display:block;
-  padding:3px;
-
-  /* Color transition */
-  transition: background-color 0.5s cubic-bezier(.09, .99, .37, .98);
-  -moz-transition: background-color 0.5s cubic-bezier(.09, .99, .37, .98);    /* FF3.7+ */
-  -o-transition: background-color 0.5s cubic-bezier(.09, .99, .37, .98) ;      /* Opera 10.5 */
-  -webkit-transition: background-color 0.5s cubic-bezier(.09, .99, .37, .98) ; /* Saf3.2+, Chrome */
-}
-
-.nodeAssignmentWrapperHover {
-  display:block;
-  padding:3px;
-  /* background-color: #00CC00; */
-  background-color: #F0F0E8;
-}
-
-.nodeAssignment {
-  display:inline-block;
-}
-
-.nodeAssignmentHover {
-  display:inline-block;
-}
-/* END selectHosts */
-/* BEGIN clusters */
-#clustersNavigationLinksDivId {
-  width: 100%;
-  text-align: center;
-  margin: 0px auto;
-  margin-bottom: 8px;
-}
-
-#clustersNavigationLinksListId {
-  margin:0;
-  padding:0;
-  text-align:center;
-  height:50px;
-}
-
-#clustersNavigationLinksListId li {
-  display: inline-block;
-  width: auto;
-  padding: 5px;
-  margin: 2px;
-  cursor: default;
-}
-
-#clustersHostRoleMappingFieldsetId {
-  margin-left: auto;
-  margin-right: auto;
-  width: 300px;
-}
-/* END clusters */
 /* BEGIN manageServices */
 #serviceManagementCoreDivId {
   width: 400px;
@@ -1444,3 +1205,38 @@ ul#serviceManagementListId,
   margin:0;
 }
 /* END manageServices */
+
+#stageTabsContainer {
+
+}
+
+#stageTabs {
+  margin: 30px 0 30px 0;
+}
+
+#stageTabs li {
+  display: inline-block;
+  width: auto;
+  padding: 10px;
+  margin: 0 4px 0 0;
+  cursor: default;
+  color: white;
+  font-size: 12px;
+  border-radius: 4px;
+  -moz-border-radius: 4px;
+  -webkit-border-radius: 4px;
+}
+
+#stageTabs li.current {
+  background-color: #65B642;
+  font-weight: bolder;
+  font-size: 14px;
+}
+
+#stageTabs li.unvisited {
+  background-color: rgb(190, 190, 190);
+}
+#stageTabs li.visited {
+  background-color: grey;
+  cursor: pointer;
+}

Copied: incubator/ambari/trunk/hmc/html/_bootstrapJs.php (from r1357334, incubator/ambari/trunk/hmc/html/bootstrapJs.htmli)
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/_bootstrapJs.php?p2=incubator/ambari/trunk/hmc/html/_bootstrapJs.php&p1=incubator/ambari/trunk/hmc/html/bootstrapJs.htmli&r1=1357334&r2=1358041&rev=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/bootstrapJs.htmli (original)
+++ incubator/ambari/trunk/hmc/html/_bootstrapJs.php Fri Jul  6 04:46:36 2012
@@ -18,9 +18,9 @@
  under the License.
 */
 ?>
-<link type="text/css" rel="stylesheet" href="../css/yuiCombined.css">
-<script src="../js/ext/yui-min.js"></script>
-<script src="../js/ext/yuiCombined.js"></script>
+<link type="text/css" rel="stylesheet" href="/hmc/css/yuiCombined.css">
+<script src="/hmc/js/ext/yui-min.js"></script>
+<script src="/hmc/js/ext/yuiCombined.js"></script>
 
 <script type="text/javascript">
   var globalYui, Y;
@@ -29,7 +29,7 @@
     for (var jsFile in jsFilesToLoad) {
       var dynamicJsScript = document.createElement("script");
       dynamicJsScript.type = "text/javascript";
-      dynamicJsScript.src = '../' + jsFilesToLoad[jsFile];
+      dynamicJsScript.src = '/hmc/' + jsFilesToLoad[jsFile];
       dynamicJsScript.async = false;
       document.getElementsByTagName("head")[0].appendChild(dynamicJsScript);
     }

Copied: incubator/ambari/trunk/hmc/html/_head.php (from r1357334, incubator/ambari/trunk/hmc/html/head.htmli)
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/_head.php?p2=incubator/ambari/trunk/hmc/html/_head.php&p1=incubator/ambari/trunk/hmc/html/head.htmli&r1=1357334&r2=1358041&rev=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/head.htmli (original)
+++ incubator/ambari/trunk/hmc/html/_head.php Fri Jul  6 04:46:36 2012
@@ -19,7 +19,7 @@
 */
 ?>
     <title id="pageTitleId"><?php echo $RES['page.title'] ?></title>
-    <link type="text/css" rel="stylesheet" href="../css/cssreset-min.css">
-    <link type="text/css" rel="stylesheet" href="../css/bootstrap.css" media="screen"/>
-    <link type="text/css" rel="stylesheet" href="../css/app.css" media="screen"/>
-    <link rel="shortcut icon" href="../images/logo-micro.gif">
+    <link type="text/css" rel="stylesheet" href="/hmc/css/cssreset-min.css">
+    <link type="text/css" rel="stylesheet" href="/hmc/css/bootstrap.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="/hmc/css/app.css" media="screen"/>
+    <link rel="shortcut icon" href="/hmc/images/logo-micro.gif">

Copied: incubator/ambari/trunk/hmc/html/_router.php (from r1357334, incubator/ambari/trunk/hmc/html/head.inc)
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/_router.php?p2=incubator/ambari/trunk/hmc/html/_router.php&p1=incubator/ambari/trunk/hmc/html/head.inc&r1=1357334&r2=1358041&rev=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/head.inc (original)
+++ incubator/ambari/trunk/hmc/html/_router.php Fri Jul  6 04:46:36 2012
@@ -1,5 +1,6 @@
 <?php
 /*
+
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
@@ -16,120 +17,139 @@
  KIND, either express or implied.  See the License for the
  specific language governing permissions and limitations
  under the License.
+
 */
 
-require_once '../php/conf/MessageResources-en.inc';
-require_once '../php/util/Logger.php';
-require_once '../php//conf/Config.inc';
-require_once "../php/util/lock.php";
-require_once '../php/db/HMCDBAccessor.php';
-require_once "../php/util/clusterState.php";
+// Do not cache pages.  Otherwise handling browser back/forward
+// can cause problems due to stale content.
+header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
+header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
+
+$BASE_DIR = dirname(__FILE__);
+require_once $BASE_DIR.'/../php/conf/MessageResources-en.inc';
+require_once $BASE_DIR.'/../php/util/Logger.php';
+require_once $BASE_DIR.'/../php/conf/Config.inc';
+require_once $BASE_DIR.'/../php/util/lock.php';
+require_once $BASE_DIR.'/../php/db/HMCDBAccessor.php';
+require_once $BASE_DIR.'/../php/util/clusterState.php';
 
-/* 
- * due to the way include files are scoped,
+/*
+ * Due to the way include files are scoped,
  * we return the string to be eval'd, rather than
  * executing them.
  */
-function redirectToPage($requestPage, $targetPage) {
-  // if the page is index.php or the root app directory, don't redirect... simply include
-  if ($requestPage != 'index.php' && $requestPage != 'html') {
-    return "header('Location: /hmc/html/$targetPage');";
+function redirectToPage($requestPage, $targetPage)
+{
+  $bypassRouter = $GLOBALS['BYPASS_ROUTER'] || (isset($_GET['bypassRouter']) && $_GET['bypassRouter']);
+  if (!$bypassRouter) {
+    // if the page is index.php or the root app directory, don't redirect... simply include
+    if ($requestPage != 'index.php' && $requestPage != 'html') {
+      return "header('Location: /hmc/html/$targetPage'); exit;";
+    } else {
+      return "require('$targetPage'); exit;";
+    }
   } else {
-    return "require('$targetPage');";
+    // do not redirect/forward.  fall through
+    return "";
   }
 }
 
-$logger = new HMCLogger("Interceptor");
+$logger = new HMCLogger("Router");
 $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']));
-$logger->log_trace('requestPage='.$requestPage);
+$logger->log_trace('requestPage=' . $requestPage);
 
 if (sizeof($clusters) == 0) {
   if ($requestPage != 'welcome.php' && $requestPage != 'initializeCluster.php') {
     eval(redirectToPage($requestPage, 'welcome.php'));
-    exit;
   }
   $clusterState = 'NOT_CONFIGURED';
 } else {
   foreach ($clusters as $cluster) {
     $clusterName = $cluster['clusterName'];
-    $state = json_decode($cluster['state'], true);    
-    $logger->log_trace('cluster state='.print_r($state,1));
+    $state = json_decode($cluster['state'], true);
+    $logger->log_trace('cluster state=' . print_r($state, 1));
     switch ($state['state']) {
       case 'NOT_CONFIGURED':
-        if ($requestPage != 'welcome.php' && 
-            $requestPage != 'initializeCluster.php') {
+        if ($requestPage != 'welcome.php' &&
+          $requestPage != 'initializeCluster.php'
+        ) {
           eval(redirectToPage($requestPage, 'welcome.php'));
-          exit;
         }
         $clusterState = 'NOT_CONFIGURED';
         break;
       case 'DEPLOYED':
         if ($state['context']['status']) {
-          if (!$bypassRouter && $requestPage == 'initializeCluster.php') {
+          if ($requestPage == 'initializeCluster.php') {
             eval(redirectToPage($requestPage, 'index.php'));
-            exit;
           }
           $clusterState = 'OPERATIONAL';
         } else {
-          if (!$bypassRouter && $requestPage != 'installFailed.php' && $requestPage != 'uninstallWizard.php') {
+          if ($requestPage != 'installFailed.php' && $requestPage != 'uninstallWizard.php') {
             eval(redirectToPage($requestPage, 'installFailed.php'));
-            exit; 
           }
-          $clusterState = 'DEPLOY_FAILED';            
+          $clusterState = 'DEPLOY_FAILED';
         }
         break;
       case 'CONFIGURATION_IN_PROGRESS':
-        if (!$bypassRouter && $requestPage != 'welcome.php' && $requestPage != 'initializeCluster.php') {
+        if ($requestPage != 'welcome.php' && $requestPage != 'initializeCluster.php') {
           eval(redirectToPage($requestPage, 'welcome.php'));
-          exit;
         }
         $clusterState = 'CONFIGURATION_IN_PROGRESS';
-        break;      
+        break;
       case 'DEPLOYMENT_IN_PROGRESS':
-        if (!$bypassRouter && $requestPage != 'showDeployProgress.php') {
+        if ($requestPage != 'showDeployProgress.php') {
           eval(redirectToPage($requestPage, 'showDeployProgress.php'));
-          exit;
-        }     
+        }
         $clusterState = 'DEPLOYMENT_IN_PROGRESS';
         break;
       case 'NODE_ADDITION_IN_PROGRESS':
-        if (!$bypassRouter && $requestPage != 'showDeployAddedNodesProgress.php') {
+        if ($requestPage != 'showDeployAddedNodesProgress.php') {
           eval(redirectToPage($requestPage, 'showDeployAddedNodesProgress.php'));
-          exit;
-        }     
+        }
         $clusterState = 'NODE_ADDITION_IN_PROGRESS';
         break;
       case 'SERVICE_MANAGEMENT_IN_PROGRESS':
-        if (!$bypassRouter && $requestPage != 'showManageServicesProgress.php') {
+        if ($requestPage != 'showManageServicesProgress.php') {
           eval(redirectToPage($requestPage, 'showManageServicesProgress.php'));
-          exit;
-        }     
+        }
         $clusterState = 'SERVICE_MANAGEMENT_IN_PROGRESS';
-        break;        
+        break;
       case 'UNINSTALLATION_IN_PROGRESS':
-        if (!$bypassRouter && $requestPage != 'showUninstallProgress.php') {
+        if ($requestPage != 'showUninstallProgress.php') {
           eval(redirectToPage($requestPage, 'showUninstallProgress.php'));
-          exit;
-        }     
+        }
         $clusterState = 'UNINSTALLATION_IN_PROGRESS';
         break;
       case 'UNINSTALLED':
-        if (!$bypassRouter && $requestPage != 'uninstallFailed.php') {
+        if ($requestPage != 'uninstallFailed.php') {
           eval(redirectToPage($requestPage, 'uninstallFailed.php'));
-          exit;
         }
         $clusterState = 'UNINSTALL_FAILED';
-        break;        
-    } 
-  }  
+        break;
+      case 'UPGRADE_STACK_PENDING':
+        if ($requestPage != 'upgradeStack/index.php') {
+          eval(redirectToPage($requestPage, 'upgradeStack/index.php'));
+        }
+        $clusterState = 'UPGRADE_STACK_PENDING';
+        break;
+      case 'UPGRADE_STACK_UNINSTALL_IN_PROGRESS':
+        if ($requestPage != 'upgradeStack/uninstall.php') {
+          eval(redirectToPage($requestPage, 'upgradeStack/uninstall.php'));
+        }
+        $clusterState = 'UPGRADE_STACK_UNINSTALL_IN_PROGRESS';
+        break;
+      case 'UPGRADE_STACK_DEPLOY_IN_PROGRESS':
+        if ($requestPage != 'upgradeStack/deploy.php') {
+          eval(redirectToPage($requestPage, 'upgradeStack/deploy.php'));
+        }
+        $clusterState = 'UPGRADE_STACK_DEPLOY_IN_PROGRESS';
+        break;
+    }
+  }
 }
 ?>

Copied: incubator/ambari/trunk/hmc/html/_topnav.php (from r1357334, incubator/ambari/trunk/hmc/html/topnav.htmli)
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/_topnav.php?p2=incubator/ambari/trunk/hmc/html/_topnav.php&p1=incubator/ambari/trunk/hmc/html/topnav.htmli&r1=1357334&r2=1358041&rev=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/topnav.htmli (original)
+++ incubator/ambari/trunk/hmc/html/_topnav.php Fri Jul  6 04:46:36 2012
@@ -19,13 +19,13 @@
 */
 ?>
 <!-- START TOPNAV -->
- <?php 
-    $homeUrl = '/hmc/html';
-	?>
+<?php
+  $homeUrl = '/hmc/html';
+?>
 	<div class="navbar">
 		<div class="navbar-inner">
 			<div class="container">
-				<a href="<?php echo $homeUrl ?>"><img id="logo" src="../images/logo-small.gif"></a>
+				<a href="<?php echo $homeUrl ?>"><img id="logo" src="/hmc/images/logo-small.gif"></a>
 				<a class="brand" href="<?php echo $homeUrl ?>"><?php echo $RES['app.name'] ?></a>
         <ul class="nav">
 				<?php if (isset($clusterState) && $clusterState == 'OPERATIONAL') { ?> 

Copied: incubator/ambari/trunk/hmc/html/_utils.php (from r1357334, incubator/ambari/trunk/hmc/html/utils.htmli)
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/_utils.php?p2=incubator/ambari/trunk/hmc/html/_utils.php&p1=incubator/ambari/trunk/hmc/html/utils.htmli&r1=1357334&r2=1358041&rev=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/utils.htmli (original)
+++ incubator/ambari/trunk/hmc/html/_utils.php Fri Jul  6 04:46:36 2012
@@ -28,7 +28,7 @@
      hideLoadingImg() method from utils.js. -->
 <div id="loadingDivId">
   <div id="loadingBlackScreenDivId"></div>
-  <img id="loadingImgId" src="../images/loadingLarge.gif"/>
+  <img id="loadingImgId" src="/hmc/images/loadingLarge.gif"/>
 </div>
 
 <!-- Placeholder for our informational YUI panel. -->

Modified: incubator/ambari/trunk/hmc/html/addNodesWizard.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/addNodesWizard.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/addNodesWizard.php (original)
+++ incubator/ambari/trunk/hmc/html/addNodesWizard.php Fri Jul  6 04:46:36 2012
@@ -18,17 +18,17 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="ContentDivId"> 
-      <?php require "./subnav.htmli"; ?>
+    <div id="content">
+      <?php require "./_subnav.php"; ?>
       
       <!-- Installation Wizard -->
       <div name="installationWizardDiv" id="installationWizardDivId" style="display:block">
@@ -53,7 +53,7 @@
           </ol>
         </div>
 
-        <?php require "./utils.htmli"; ?>
+        <?php require "./_utils.php"; ?>
 
         <div name="installationMainFormsDiv" id="installationMainFormsDivId">
           <div id="addNodesCoreDivId" style="display:block">
@@ -103,20 +103,20 @@
             <button class="btn btn-large" id="deployAddedNodesSubmitButtonId"><?php echo $RES['addNodesWizard.selectServices.submit.label'] ?></button>
           </div>
 
-          <?php require "./txnUtils.htmli"; ?>
+          <?php require "./_txnUtils.php"; ?>
 
         </div>
       </div>
       <!-- End of installation Wizard -->
 
     </div>
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
 
     var freshInstall = false;
-    var clusterName = "<?php echo $_GET['clusterName']; ?>";
+    var clusterName = "<?php echo $clusterName; ?>";
     var nodesAction = "addNodes";
 
     var InstallationWizard = {
@@ -142,7 +142,7 @@
       ];
     </script>
   
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
 
   </body>

Modified: incubator/ambari/trunk/hmc/html/index.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/index.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/index.php (original)
+++ incubator/ambari/trunk/hmc/html/index.php Fri Jul  6 04:46:36 2012
@@ -18,32 +18,27 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
       
-    <div id="ContentDivId">
-      <?php require "./subnav.htmli"; ?>
-      <?php require "./utils.htmli"; ?>            
+    <div id="content">
+      <?php require "./_subnav.php"; ?>
+      <?php require "./_utils.php"; ?>
 
-      <!-- List of clusters -->
-      <div id="clustersListDivId" style="display:none">
-      </div>
-
-      <div id="clusterHostRoleMappingDivId" style="display:none">
-        <div id="clusterHostRoleMappingDynamicRenderDivId">
+      <div id="clusterHostRoleMapping" style="display:none">
+        <div id="clusterHostRoleMappingContent">
         </div>      
       </div>
-
     </div>        
     <!-- End of contentDivId -->
     
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
@@ -54,7 +49,7 @@
       ];
     </script>
 
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
   </body>
 </html> 

Modified: incubator/ambari/trunk/hmc/html/initializeCluster.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/initializeCluster.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/initializeCluster.php (original)
+++ incubator/ambari/trunk/hmc/html/initializeCluster.php Fri Jul  6 04:46:36 2012
@@ -18,18 +18,18 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc"; ?>
+<?php require_once "./_router.php"; ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
     <script src="../js/ext/jquery.min.js"></script>
     <script src="../js/ext/bootstrap.min.js"></script>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="ContentDivId">
+    <div id="content">
 
       <!-- List of clusters
       <div name="clustersListDiv" id="clustersListDivId">
@@ -99,7 +99,7 @@
           </ol>
         </div>
 
-        <?php require "./utils.htmli"; ?>
+        <?php require "./_utils.php"; ?>
 
         <div id="installationMainFormsDivId">
               <div id="createClusterCoreDivId">
@@ -184,7 +184,7 @@
                   </div>
                 </div>
                 </fieldset>
-                <a href="javascript:void 0" class="btn btn-large" style="margin:10px 0 0 60px" id="selectServicesSubmitButtonId" class="submitButton"><?php echo $RES['initWizard.selectServices.submit.label'] ?></a>
+                <a href="javascript:void 0" class="btn btn-large" style="margin:10px 0 0 60px" id="selectServicesSubmitButtonId"><?php echo $RES['initWizard.selectServices.submit.label'] ?></a>
 
               </div>
               <!-- End of selectServicesCoreDivId -->
@@ -287,13 +287,13 @@
                   <a href="javascript:void 0" class="btn btn-large" id="deploySubmitButtonId" value="Deploy"><?php echo $RES['initWizard.reviewAndDeploy.submit.label'] ?></a>
                 </div>
 
-                <?php require "./txnUtils.htmli"; ?>
+                <?php require "./_txnUtils.php"; ?>
 
               </div>
             </div>
             <!-- End of installation Wizard -->
     </div>
-            <?php require "./footer.htmli"; ?>
+            <?php require "./_footer.php"; ?>
 
             <!-- Javascript Scaffolding -->
             <script type="text/javascript">
@@ -343,7 +343,7 @@
             // jsFilesToLoad.push('js/test/initializeClusterTest.js');
             </script>
 
-            <?php require "./bootstrapJs.htmli"; ?>
+            <?php require "./_bootstrapJs.php"; ?>
             <!-- End of Javascript Scaffolding -->
 
           </body>

Modified: incubator/ambari/trunk/hmc/html/installFailed.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/installFailed.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/installFailed.php (original)
+++ incubator/ambari/trunk/hmc/html/installFailed.php Fri Jul  6 04:46:36 2012
@@ -18,14 +18,14 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
-    <div id="ContentDivId"> 
+    <?php require "./_topnav.php"; ?>
+    <div id="content">
       <div class="container">
         <div class="alert alert-important" style="margin-top:40px;padding:20px">
           <h2 style="margin-bottom:10px"><?php echo $RES['installFailed.header'] ?></h2>
@@ -34,6 +34,6 @@
         </div>
       </div>
     </div>
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
   </body>
 </html>

Modified: incubator/ambari/trunk/hmc/html/manageServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/manageServices.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/manageServices.php (original)
+++ incubator/ambari/trunk/hmc/html/manageServices.php Fri Jul  6 04:46:36 2012
@@ -18,93 +18,43 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="ContentDivId">
-      <?php require "./subnav.htmli"; ?>
-      <?php require "./utils.htmli"; ?>
+    <div id="content">
+      <?php require "./_subnav.php"; ?>
+      <?php require "./_utils.php"; ?>
 
       <!-- Service Management: The Main Event -->
       <div id="serviceManagementCoreDivId">
         <ul id="serviceManagementListId">
           <div id="serviceManagementDynamicRenderDivId">
-            <!--
-            <li class="serviceManagementEntry serviceManagementEntryStopped">
-              <div>
-                <span class="serviceManagementEntryNameContainer">
-                  <a href="javascript:void(null)" class="serviceManagementEntryName">HDFS</a>
-                </span>
-                <div class="serviceManagementEntryActionsContainer">
-                  <a href="javascript:void(null)" title="Start" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionStart"></a>
-                  <a href="javascript:void(null)" title="Stop" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionStop"></a>
-                  <a href="javascript:void(null)" title="Reconfigure" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionReconfigure"></a>
-                </div>
-              </div>
-            </li>
-            <li class="serviceManagementEntry serviceManagementEntryStarted">
-              <div>
-                <span class="serviceManagementEntryNameContainer">
-                  <a href="javascript:void(null)" class="serviceManagementEntryName">MapReduce</a>
-                </span>
-                <div class="serviceManagementEntryActionsContainer">
-                  <a href="javascript:void(null)" title="Start" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionStart"></a>
-                  <a href="javascript:void(null)" title="Stop" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionStop"></a>
-                  <a href="javascript:void(null)" title="Reconfigure" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionReconfigure"></a>
-                </div>
-              </div>
-            </li>
-            <li class="serviceManagementEntry serviceManagementEntryStarted">
-              <div>
-                <span class="serviceManagementEntryNameContainer">
-                  <a href="javascript:void(null)" class="serviceManagementEntryName">HBase</a>
-                </span>
-                <div class="serviceManagementEntryActionsContainer">
-                  <a href="javascript:void(null)" title="Start" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionStart"></a>
-                  <a href="javascript:void(null)" title="Stop" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionStop"></a>
-                  <a href="javascript:void(null)" title="Reconfigure" 
-                     class="serviceManagementEntryAction serviceManagementEntryActionReconfigure"></a>
-                </div>
-              </div>
-            </li>
-            -->
           </div>
         </ul>
         <div id="serviceManagementGlobalActionsDivId" style="display:none">
           <button class="btn btn-large" id="serviceManagementGlobalActionsStartAllButtonId" name="startAll" style="margin-right:10px"><i class="iconic-play" style="margin-right:10px"></i>Start All</button>
           <button class="btn btn-large" id="serviceManagementGlobalActionsStopAllButtonId" name="stopAll"><i class="iconic-stop" style="margin-right:10px"></i>Stop All</button>
         </div>
-
-        <br/>
-
       </div>
       <!-- End of serviceManagementCoreDivId -->
 
-      <?php require "./txnUtils.htmli"; ?>
+      <?php require "./_txnUtils.php"; ?>
 
     </div>
     <!-- End of contentDivId -->
 
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
       /* Minimal data required to bootstrap manageServices.js. */
-      var clusterName = '<?php echo $_GET['clusterName']; ?>';
+      var clusterName = '<?php echo $clusterName; ?>';
 
       var jsFilesToLoad = [ 
         'js/utils.js',
@@ -115,7 +65,7 @@
       ];
     </script>
 
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
 
   </body>

Modified: incubator/ambari/trunk/hmc/html/showDeployAddedNodesProgress.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/showDeployAddedNodesProgress.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/showDeployAddedNodesProgress.php (original)
+++ incubator/ambari/trunk/hmc/html/showDeployAddedNodesProgress.php Fri Jul  6 04:46:36 2012
@@ -18,24 +18,24 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="contentDivId"> 
+    <div id="content">
 
-      <?php require "./utils.htmli"; ?>
-      <?php require "./txnUtils.htmli"; ?>
+      <?php require "./_utils.php"; ?>
+      <?php require "./_txnUtils.php"; ?>
 
     </div>
     <!-- End of contentDivId -->
 
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
@@ -50,7 +50,7 @@
       ];
     </script>
 
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
   </body>
 </html> 

Modified: incubator/ambari/trunk/hmc/html/showDeployProgress.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/showDeployProgress.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/showDeployProgress.php (original)
+++ incubator/ambari/trunk/hmc/html/showDeployProgress.php Fri Jul  6 04:46:36 2012
@@ -18,24 +18,24 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="contentDivId"> 
+    <div id="content">
 
-      <?php require "./utils.htmli"; ?>
-      <?php require "./txnUtils.htmli"; ?>
+      <?php require "./_utils.php"; ?>
+      <?php require "./_txnUtils.php"; ?>
 
     </div>
     <!-- End of contentDivId -->
 
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
@@ -50,7 +50,7 @@
       ];
     </script>
 
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
   </body>
 </html> 

Modified: incubator/ambari/trunk/hmc/html/showManageServicesProgress.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/showManageServicesProgress.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/showManageServicesProgress.php (original)
+++ incubator/ambari/trunk/hmc/html/showManageServicesProgress.php Fri Jul  6 04:46:36 2012
@@ -18,24 +18,24 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="contentDivId"> 
+    <div id="content">
 
-      <?php require "./utils.htmli"; ?>
-      <?php require "./txnUtils.htmli"; ?>
+      <?php require "./_utils.php"; ?>
+      <?php require "./_txnUtils.php"; ?>
 
     </div>
     <!-- End of contentDivId -->
 
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
@@ -50,7 +50,7 @@
       ];
     </script>
 
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
   </body>
 </html> 

Modified: incubator/ambari/trunk/hmc/html/showUninstallProgress.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/showUninstallProgress.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/showUninstallProgress.php (original)
+++ incubator/ambari/trunk/hmc/html/showUninstallProgress.php Fri Jul  6 04:46:36 2012
@@ -18,24 +18,24 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="contentDivId"> 
+    <div id="content">
 
-      <?php require "./utils.htmli"; ?>
-      <?php require "./txnUtils.htmli"; ?>
+      <?php require "./_utils.php"; ?>
+      <?php require "./_txnUtils.php"; ?>
 
     </div>
     <!-- End of contentDivId -->
 
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
@@ -50,7 +50,7 @@
       ];
     </script>
 
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
   </body>
 </html> 

Modified: incubator/ambari/trunk/hmc/html/uninstallFailed.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/uninstallFailed.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/uninstallFailed.php (original)
+++ incubator/ambari/trunk/hmc/html/uninstallFailed.php Fri Jul  6 04:46:36 2012
@@ -18,14 +18,14 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
-    <div id="ContentDivId"> 
+    <?php require "./_topnav.php"; ?>
+    <div id="content">
       <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>
@@ -36,6 +36,6 @@
         </div>
       </div>
     </div>
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
   </body>
 </html>

Modified: incubator/ambari/trunk/hmc/html/uninstallWizard.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/uninstallWizard.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/uninstallWizard.php (original)
+++ incubator/ambari/trunk/hmc/html/uninstallWizard.php Fri Jul  6 04:46:36 2012
@@ -18,26 +18,22 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc" ?>
+<?php require_once "./_router.php" ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
-    <?php 
-     include_once ("../php/util/clusterState.php"); 
-    // $clusterName = "m4v1";
-    // $clusterState = needWipeOut($clusterName); 
-    ?>
+    <?php require "./_topnav.php"; ?>
+    <?php include_once "../php/util/clusterState.php"; ?>
     
-    <div id="ContentDivId"> 
-      <?php require "./subnav.htmli"; ?>
+    <div id="content">
+      <?php require "./_subnav.php"; ?>
 
       <!-- Uninstallation Wizard -->
       <div id="installationWizardDivId" style="display:block">
-        <?php require "./utils.htmli"; ?>
+        <?php require "./_utils.php"; ?>
         <div class="pageSummary" style="margin-top:0px">
           <h2><?php echo $RES['uninstallWizard.pageSummary.header'] ?></h2>
           <p><?php echo $RES['uninstallWizard.pageSummary.body'] ?></p>
@@ -67,20 +63,20 @@
               </fieldset>
             </div>
           </div>
-          <?php require "./txnUtils.htmli"; ?>
+          <?php require "./_txnUtils.php"; ?>
 
         </div>
       </div>
       <!-- End of Uninstallation Wizard -->
     </div>            
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
 
     <!-- Javascript Scaffolding -->
     <script type="text/javascript">
 
     var freshInstall = false;
     var nodesAction = "uninstall";
-    var clusterName = "<?php echo $_GET['clusterName']; ?>";
+    var clusterName = "<?php echo $clusterName; ?>";
 
     var InstallationWizard = {
 
@@ -98,7 +94,7 @@
       ];
     </script>
 
-    <?php require "./bootstrapJs.htmli"; ?>
+    <?php require "./_bootstrapJs.php"; ?>
     <!-- End of Javascript Scaffolding -->
 
   </body>

Added: incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php?rev=1358041&view=auto
==============================================================================
--- incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php (added)
+++ incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php Fri Jul  6 04:46:36 2012
@@ -0,0 +1,61 @@
+<?php
+/*
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+*/
+
+switch ($requestPage) {
+  case 'uninstall.php':
+    $uninstallStageClass = 'current';
+    $reconfigureStageClass = 'unvisited';
+    $deployStageClass = 'unvisited';
+    break;
+  case 'reconfigure.php':
+    $uninstallStageClass = 'visited';
+    $reconfigureStageClass = 'current';
+    $deployStageClass = 'unvisited';
+    break;
+  case 'deploy.php':
+    $uninstallStageClass = 'visited';
+    $reconfigureStageClass = 'visited';
+    $deployStageClass = 'current';
+    break;
+}
+
+?>
+  <div id="stageTabsContainer">
+    <ul id="stageTabs">
+      <li id="uninstallStage" class="<?php echo $uninstallStageClass ?>">
+        <div>
+          <span class="stageNumber">1.</span>
+          Uninstall Services
+        </div>
+      </li>
+      <li id="reconfigureStage" class="<?php echo $reconfigureStageClass ?>">
+        <div>
+          <span class="stageNumber">2.</span>
+          Reconfigure Services
+        </div>
+      </li>
+      <li id="deployStage" class="<?php echo $deployStageClass ?>">
+        <div>
+          <span class="stageNumber">3.</span>
+          Deploy New Version
+        </div>
+      </li>
+    </ul>
+  </div>
\ No newline at end of file

Added: incubator/ambari/trunk/hmc/html/upgradeStack/deploy.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/upgradeStack/deploy.php?rev=1358041&view=auto
==============================================================================
--- incubator/ambari/trunk/hmc/html/upgradeStack/deploy.php (added)
+++ incubator/ambari/trunk/hmc/html/upgradeStack/deploy.php Fri Jul  6 04:46:36 2012
@@ -0,0 +1,77 @@
+<?php
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+?>
+<?php require_once '../_router.php' ?>
+<html>
+<head>
+  <?php require "../_head.php" ?>
+  <script src="/hmc/js/ext/jquery.min.js"></script>
+</head>
+
+<body class="yui3-skin-sam">
+  <?php require "../_topnav.php"; ?>
+
+  <div id="content">
+    <?php require '_stageMenu.php'; ?>
+
+    <!-- Begin Wizard -->
+    <div id="upgradeStackWizard">
+      <?php require "../_utils.php"; ?>
+      <div id="deployPanel">
+        <div class="pageSummary" style="margin-top:0px">
+          <h2><?php echo $RES['upgradeStack.deploy.pageSummary.header'] ?></h2>
+          <p><?php echo $RES['upgradeStack.deploy.pageSummary.body'] ?></p>
+        </div>
+        <div id="formStatusDivId" class="alert alert-error" style="display:none">
+        </div>
+        <form id="deployFormId">
+          <fieldset id="deployFieldSetId">
+            <!--<legend>Review your settings</legend>-->
+            <div id="deployDynamicRenderDivId"></div>
+          </fieldset>
+        </form>
+        <!--<a href="reconfigure.php" class="btn btn-large" id="backToReconfigureButton"><?php echo $RES['upgradeStack.deploy.backButton.label'] ?></a>-->
+        <a href="javascript:void 0" class="btn btn-large btn-success" id="deploySubmitButton" style="margin:0 0 40px 320px"><?php echo $RES['upgradeStack.deploy.submit.label'] ?></a>
+      </div>
+      <?php require "../_txnUtils.php"; ?>
+    </div>
+    <!-- End Wizard -->
+  </div>
+  <?php require "../_footer.php"; ?>
+
+  <!-- Javascript Scaffolding -->
+  <script type="text/javascript">
+
+    var clusterName = '<?php echo $clusterName; ?>';
+
+    var jsFilesToLoad = [
+      'js/ext/sinon.min.js',
+      'js/utils.js',
+      'js/txnUtils.js',
+      'js/configureServicesUtils.js',
+      'js/upgradeStack/deploy.js'
+    ];
+  </script>
+
+  <?php require "../_bootstrapJs.php"; ?>
+  <!-- End of Javascript Scaffolding -->
+
+</body>
+</html> 

Added: incubator/ambari/trunk/hmc/html/upgradeStack/index.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/upgradeStack/index.php?rev=1358041&view=auto
==============================================================================
--- incubator/ambari/trunk/hmc/html/upgradeStack/index.php (added)
+++ incubator/ambari/trunk/hmc/html/upgradeStack/index.php Fri Jul  6 04:46:36 2012
@@ -0,0 +1,42 @@
+<?php
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+?>
+<?php require_once '../_router.php' ?>
+<html>
+<head>
+  <?php require "../_head.php" ?>
+  <script src="/hmc/js/ext/jquery.min.js"></script>
+</head>
+<body class="yui3-skin-sam">
+  <?php require "../_topnav.php"; ?>
+
+  <div id="content">
+      <div class="alert alert-info" style="margin-top:40px;padding:20px">
+        <h2><?php echo $RES['upgradeStack.index.pageSummary.header'] ?></h2>
+        <p><?php echo $RES['upgradeStack.index.pageSummary.body'] ?></p>
+        <p style="font-weight:bold">Upgrading from HDP Version X to Y</p>
+        <a href="uninstall.php" class="btn btn-large" id="submitButton"><?php echo $RES['upgradeStack.index.submit.label'] ?></a>
+      </div>
+    </div>
+  </div>
+  <?php require "../_footer.php"; ?>
+
+</body>
+</html> 

Added: incubator/ambari/trunk/hmc/html/upgradeStack/reconfigure.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/upgradeStack/reconfigure.php?rev=1358041&view=auto
==============================================================================
--- incubator/ambari/trunk/hmc/html/upgradeStack/reconfigure.php (added)
+++ incubator/ambari/trunk/hmc/html/upgradeStack/reconfigure.php Fri Jul  6 04:46:36 2012
@@ -0,0 +1,88 @@
+<?php
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+?>
+<?php require_once '../_router.php' ?>
+<html>
+<head>
+  <?php require "../_head.php" ?>
+  <script src="/hmc/js/ext/jquery.min.js"></script>
+  <script src="/hmc/js/ext/bootstrap.min.js"></script>
+</head>
+
+<body class="yui3-skin-sam">
+  <?php require "../_topnav.php"; ?>
+
+  <div id="content">
+    <?php require '_stageMenu.php'; ?>
+
+    <!-- Begin Wizard -->
+    <div id="upgradeStackWizard">
+      <?php require "../_utils.php"; ?>
+      <div id="reconfigurePanel">
+        <div class="pageSummary" style="margin-top:0px">
+          <h2><?php echo $RES['upgradeStack.reconfigure.pageSummary.header'] ?></h2>
+          <p><?php echo $RES['upgradeStack.reconfigure.pageSummary.body'] ?></p>
+        </div>
+        <div id="formStatusDivId" class="alert alert-error" style="display:none">
+        </div>
+        <div id="configureClusterAdvancedCoreDivId">
+          <form id="configureClusterAdvancedFormId">
+            <fieldset id="configureClusterAdvancedFieldSetId">
+              <div id="configureClusterAdvancedDynamicRenderDivId"></div>
+            </fieldset>
+          </form>
+          <div id="buttonAreaDivId" class="clearfix">
+            <div id="buttonGroupDivId">
+              <?php /*
+                          <div id="backNextDivId" class="btn-group">
+                            <a href="javascript:void 0" class="btn btn-large" id="configureClusterAdvancedBackButtonId"><?php echo $RES['initWizard.configureClusterAdvanced.back.label'] ?></a>
+                            <a href="javascript:void 0" class="btn btn-large" id="configureClusterAdvancedNextButtonId"><?php echo $RES['initWizard.configureClusterAdvanced.next.label'] ?></a>
+                          </div>
+                          */ ?>
+              <a href="javascript:void 0" class="btn btn-large btn-success" id="reconfigureSubmitButton"><?php echo $RES['upgradeStack.reconfigure.submit.label'] ?></a>
+            </div>
+          </div>
+        </div>
+      </div>
+      <?php require "../_txnUtils.php"; ?>
+    </div>
+    <!-- End Wizard -->
+  </div>
+  <?php require "../_footer.php"; ?>
+
+  <!-- Javascript Scaffolding -->
+  <script type="text/javascript">
+
+    var clusterName = '<?php echo $clusterName; ?>';
+
+    var jsFilesToLoad = [
+      'js/ext/sinon.min.js',
+      'js/utils.js',
+      'js/txnUtils.js',
+      'js/configureServicesUtils.js',
+      'js/upgradeStack/reconfigure.js'
+    ];
+  </script>
+
+  <?php require "../_bootstrapJs.php"; ?>
+  <!-- End of Javascript Scaffolding -->
+
+</body>
+</html> 

Added: incubator/ambari/trunk/hmc/html/upgradeStack/uninstall.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/upgradeStack/uninstall.php?rev=1358041&view=auto
==============================================================================
--- incubator/ambari/trunk/hmc/html/upgradeStack/uninstall.php (added)
+++ incubator/ambari/trunk/hmc/html/upgradeStack/uninstall.php Fri Jul  6 04:46:36 2012
@@ -0,0 +1,68 @@
+<?php
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+*/
+?>
+<?php require_once '../_router.php' ?>
+<html>
+<head>
+  <?php require "../_head.php" ?>
+  <script src="/hmc/js/ext/jquery.min.js"></script>
+</head>
+<body class="yui3-skin-sam">
+  <?php require "../_topnav.php"; ?>
+
+  <div id="content">
+    <?php require '_stageMenu.php'; ?>
+
+    <!-- Begin Wizard -->
+    <div id="upgradeStackWizard">
+      <?php require "../_utils.php"; ?>
+      <div id="uninstallPanel">
+        <div class="pageSummary" style="margin-top:0px">
+          <h2><?php echo $RES['upgradeStack.uninstall.pageSummary.header'] ?></h2>
+          <p><?php echo $RES['upgradeStack.uninstall.pageSummary.body'] ?></p>
+        </div>
+        <div id="formStatusDivId" class="alert alert-error" style="display:none">
+        </div>
+        <a href="javascript:void 0" class="btn btn-large btn-success" id="uninstallSubmitButton"><?php echo $RES['upgradeStack.uninstall.submit.label'] ?></a>
+      </div>
+      <?php require "../_txnUtils.php"; ?>
+    </div>
+    <!-- End Wizard -->
+  </div>
+  <?php require "../_footer.php"; ?>
+
+  <!-- Javascript Scaffolding -->
+  <script type="text/javascript">
+
+  var clusterName = '<?php echo $clusterName; ?>';
+
+  var jsFilesToLoad = [
+      'js/ext/sinon.min.js',
+      'js/utils.js',
+      'js/txnUtils.js',
+      'js/upgradeStack/uninstall.js'
+    ];
+  </script>
+
+  <?php require "../_bootstrapJs.php"; ?>
+  <!-- End of Javascript Scaffolding -->
+
+</body>
+</html> 

Modified: incubator/ambari/trunk/hmc/html/welcome.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/welcome.php?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/welcome.php (original)
+++ incubator/ambari/trunk/hmc/html/welcome.php Fri Jul  6 04:46:36 2012
@@ -18,16 +18,16 @@
  under the License.
 */
 ?>
-<?php require_once "./head.inc"; ?>
+<?php require_once "./_router.php"; ?>
 <html>
   <head>
-    <?php require "./head.htmli" ?>
+    <?php require "./_head.php" ?>
   </head>
 
   <body class="yui3-skin-sam">
-    <?php require "./topnav.htmli"; ?>
+    <?php require "./_topnav.php"; ?>
 
-    <div id="ContentDivId">
+    <div id="content">
       <div class="alert alert-info" style="margin-top:40px;padding:20px">
         <h2 style="margin-bottom:10px"><?php echo $RES['welcome.header'] ?></h2>
         <p><?php echo $RES['welcome.body'] ?></p>
@@ -35,6 +35,6 @@
         <a id="submitLinkId" class='btn btn-large' style='margin-top:20px' href='initializeCluster.php'><?php echo $RES['welcome.submit.label'] ?></a>
       </div>
     </div>
-    <?php require "./footer.htmli"; ?>
+    <?php require "./_footer.php"; ?>
   </body>
 </html>

Modified: incubator/ambari/trunk/hmc/js/assignMasters.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/js/assignMasters.js?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/js/assignMasters.js (original)
+++ incubator/ambari/trunk/hmc/js/assignMasters.js Fri Jul  6 04:46:36 2012
@@ -245,7 +245,7 @@ function AssignMasters() {
     if (hostsToMasterServices[managerHostName] == null) {
       hostsToMasterServices[managerHostName] = {};
     }
-    hostsToMasterServices[managerHostName].MANAGER_SERVER = App.Props.managerServiceName + ' Server';
+    hostsToMasterServices[managerHostName].MANAGER_SERVER = App.props.managerServiceName + ' Server';
 
     $('#masterServicesToHosts').html(markup);
     

Modified: incubator/ambari/trunk/hmc/js/clustersList.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/js/clustersList.js?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/js/clustersList.js (original)
+++ incubator/ambari/trunk/hmc/js/clustersList.js Fri Jul  6 04:46:36 2012
@@ -34,7 +34,7 @@ function ClustersList() {
           clusterServices[serviceName].attributes.runnable &&
           !clusterServices[serviceName].attributes.noDisplay) {
 
-          globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
+          Y.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
             if (serviceComponent.isMaster) {
               // just add the master to the hostname object
               for (var i in serviceComponent.hostNames) {
@@ -53,7 +53,7 @@ function ClustersList() {
     if (!(hostName in hostMap)) {
       hostMap[hostName] = [];
     }
-    hostMap[hostName].push({ serviceName: App.Props.managerServiceName + ' Server', isMaster: true });
+    hostMap[hostName].push({ serviceName: App.props.managerServiceName + ' Server', isMaster: true });
   }
 
   function populateHostToClientRoleMapping(clusterServices, hostMap) {
@@ -64,7 +64,7 @@ function ClustersList() {
         if (clusterServices[serviceName].isEnabled == "1" &&
           !clusterServices[serviceName].attributes.noDisplay) {
 
-          globalYui.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
+          Y.Array.each( clusterServices[serviceName].components, function (serviceComponent) {
             if (serviceComponent.isClient) {
               // just add the client to the hostname object
               for (var i in serviceComponent.hostNames) {
@@ -106,23 +106,25 @@ function ClustersList() {
 
   this.render = function() {
 
-    globalYui.io("../php/frontend/listClusters.php", {
+    Y.io("/hmc/php/frontend/listClusters.php", {
       method: 'GET',
-      timeout : 10000,
+      timeout : App.io.DEFAULT_AJAX_TIMEOUT_MS,
       on: {
         success: function (x,o) {
-          globalYui.log("RAW JSON DATA: " + o.responseText);
+          var clusterListInfoJson;
+          
+          Y.log("RAW JSON DATA: " + o.responseText);
 
           // Process the JSON data returned from the server
           try {
-            clusterListInfoJson = globalYui.JSON.parse(o.responseText);
+            clusterListInfoJson = Y.JSON.parse(o.responseText);
           }
           catch (e) {
             alert("JSON Parse failed!");
             return;
           }
 
-          globalYui.log("PARSED DATA: " + globalYui.Lang.dump(clusterListInfoJson));
+          Y.log("PARSED DATA: " + Y.Lang.dump(clusterListInfoJson));
 
           if (clusterListInfoJson.result != 0) {
             // Error!
@@ -152,8 +154,8 @@ function ClustersList() {
               var clusterName; var clusterInfo;
               for (clusterId in clusterListInfoJson) {
                 clusterName = clusterId;
-                clusterInfo = globalYui.JSON.parse(clusterListInfoJson[clusterName]);
-                globalYui.log( "Cluster Info: " + globalYui.Lang.dump(clusterInfo.displayName));
+                clusterInfo = Y.JSON.parse(clusterListInfoJson[clusterName]);
+                Y.log( "Cluster Info: " + Y.Lang.dump(clusterInfo.displayName));
               }
             }
           }
@@ -165,19 +167,19 @@ function ClustersList() {
           }
 
           /* Beginning of adding Role Topology information. */
-          globalYui.io( "../php/frontend/fetchClusterServices.php?clusterName=" + clusterName + "&getConfigs=true&getComponents=true", {
-            timeout: 10000,
+          Y.io( "/hmc/php/frontend/fetchClusterServices.php?clusterName=" + clusterName + "&getConfigs=true&getComponents=true", {
+            timeout: App.io.DEFAULT_AJAX_TIMEOUT_MS,
             on: {
               success: function(x1, o1) {
 
-                hideLoadingImg();
+                App.ui.hideLoadingOverlay();
 
-                globalYui.log("RAW JSON DATA: " + o1.responseText);
+                Y.log("RAW JSON DATA: " + o1.responseText);
 
                 var clusterServicesResponseJson;
 
                 try {
-                  clusterServicesResponseJson = globalYui.JSON.parse(o1.responseText);
+                  clusterServicesResponseJson = Y.JSON.parse(o1.responseText);
                 }
                 catch (e) {
                   alert("JSON Parse failed");
@@ -186,7 +188,7 @@ function ClustersList() {
 
                 managerHostName = clusterServicesResponseJson.response.managerHostName;
 
-                globalYui.log(globalYui.Lang.dump(clusterServicesResponseJson));
+                Y.log(Y.Lang.dump(clusterServicesResponseJson));
 
                 /* Check that clusterServicesResponseJson actually indicates success. */
                 if( clusterServicesResponseJson.result == 0 ) {
@@ -202,42 +204,31 @@ function ClustersList() {
                       '</div>' +
                       '</div>';
 
-                  globalYui.one("#clusterHostRoleMappingDynamicRenderDivId").setContent(
+                  Y.one("#clusterHostRoleMappingContent").setContent(
                     markup + generateHostRoleMappingMarkup(clusterServices) );
-                  globalYui.one("#clusterHostRoleMappingDivId").show();
+                  Y.one("#clusterHostRoleMapping").show();
                 }
                 else {
                   alert("Fetching Cluster Services failed");
                 }
               },
               failure: function(x1, o1) {
-                hideLoadingImg();
-                alert("Async call failed");
+                App.ui.hideLoadingOverlay();
+                alert(App.io.DEFAULT_AJAX_ERROR_MESSAGE);
               }
             }
           });
           /* End of adding Role Topology information. */
 
-          globalYui.one("#clustersListDivId").setContent( clustersListMarkup );
-          globalYui.one("#clustersListDivId").setStyle('display', 'block');
-
-          if (globalYui.one('#newClusterLinkDivId') != null) {
-            globalYui.one('#newClusterLinkDivId').on('click',function (e) {
-              /* Done with this stage, hide it. */
-              globalYui.one("#clustersListDivId").setStyle('display','none');
-              // globalYui.one("#installationWizardDivId").setStyle('display','block');
-            });
-          }
-
         },
         failure: function (x,o) {
           //    e.target.set('disabled', false);
-          alert("Async call failed!");
+          alert(App.io.DEFAULT_AJAX_ERROR_MESSAGE);
         }
       }
     });
   }; // end render
 };
 
-var clustersList = new ClustersList();
-clustersList.render();
+new ClustersList().render();
+

Modified: incubator/ambari/trunk/hmc/js/configureServices.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/js/configureServices.js?rev=1358041&r1=1358040&r2=1358041&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/js/configureServices.js (original)
+++ incubator/ambari/trunk/hmc/js/configureServices.js Fri Jul  6 04:46:36 2012
@@ -19,24 +19,22 @@
  *
 */
 
-var globalOptionsInfo = null;
-           
 Y.one('#configureClusterAdvancedSubmitButtonId').on('click',function (e) {
   
   if (this.hasClass('disabled')) {
     return;
   }
   
-  var opts = configureServicesUtil.generateUserOpts();
+  var opts = App.ui.configureServicesUtil.generateUserOpts();
 
   e.target.set('disabled', true);
-  var url = "../php/frontend/configureServices.php?clusterName="+globalOptionsInfo.clusterName;
+  var url = "../php/frontend/configureServices.php?clusterName=" + App.props.clusterName;
   var requestData = opts;
   var submitButton = e.target;
   var thisScreenId = "#configureClusterAdvancedCoreDivId";
   var nextScreenId = "#deployCoreDivId";
   var nextScreenRenderFunction = renderDeploy;
-  var errorFunction = configureServicesUtil.handleConfigureServiceErrors;
+  var errorFunction = App.ui.configureServicesUtil.handleConfigureServiceErrors;
   submitDataAndProgressToNextScreen(url, requestData, submitButton,
       thisScreenId, nextScreenId, nextScreenRenderFunction, errorFunction);
 });
@@ -46,8 +44,8 @@ Y.one('#configureClusterAdvancedSubmitBu
 Y.one("#configureClusterAdvancedDynamicRenderDivId").delegate(
   {
     'keyup' : function (e) {
-      configureServicesUtil.checkPasswordCorrectness();
-      configureServicesUtil.updateServiceErrorCount(e.target.get('name'));
+      App.ui.configureServicesUtil.checkPasswordCorrectness();
+      App.ui.configureServicesUtil.updateServiceErrorCount(e.target.get('name'));
     }
   },
   "input[type=password]"
@@ -56,23 +54,23 @@ Y.one("#configureClusterAdvancedDynamicR
 Y.one("#configureClusterAdvancedDynamicRenderDivId").delegate(
   {
     'keyup' : function (e) {
-      configureServicesUtil.clearErrorReason('#' + e.target.get('id'));
-      configureServicesUtil.updateServiceErrorCount(e.target.get('name'));
+      App.ui.configureServicesUtil.clearErrorReason('#' + e.target.get('id'));
+      App.ui.configureServicesUtil.updateServiceErrorCount(e.target.get('name'));
     }
   },
   "input[type=text],input[type=password]:not(.retypePassword)"
 );
 
 function renderConfigureServicesInternal (optionsInfo) {
-  Y.one("#configureClusterAdvancedDynamicRenderDivId").setContent(configureServicesUtil.getOptionsSummaryMarkup(optionsInfo, false));
+  Y.one("#configureClusterAdvancedDynamicRenderDivId").setContent(App.ui.configureServicesUtil.getOptionsSummaryMarkup(optionsInfo, false));
   $('#configureServicesTabs a:first').tab('show');
   Y.one("#configureClusterAdvancedCoreDivId").show();
   Y.one('#configureClusterAdvancedSubmitButtonId').simulate('click');  
-  hideLoadingImg();
+  App.ui.hideLoadingOverlay();
 }
 
 function renderOptionsPage (optionsInfo) {
-  globalOptionsInfo = optionsInfo;
+  App.props.clusterName = optionsInfo.clusterName;
   var inputUrl = "../php/frontend/fetchClusterServices.php?clusterName=" + optionsInfo.clusterName + "&getConfigs=true";
   executeStage(inputUrl, renderConfigureServicesInternal);
 }