incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1358427 - in /incubator/ambari/trunk: CHANGES.txt hmc/html/_router.php hmc/html/upgradeStack/_stageMenu.php
Date Fri, 06 Jul 2012 21:20:42 GMT
Author: yusaku
Date: Fri Jul  6 21:20:42 2012
New Revision: 1358427

URL: http://svn.apache.org/viewvc?rev=1358427&view=rev
Log:
AMBARI-609. Modify router to handle hierarchical directory structure for
  front-facing PHP files (Contributed by yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/hmc/html/_router.php
    incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1358427&r1=1358426&r2=1358427&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri Jul  6 21:20:42 2012
@@ -6,6 +6,9 @@ characters wide.
 
 Release 1.0.0 - unreleased
 
+  AMBARI-609. Modify router to handle hierarchical directory structure for
+  front-facing PHP files (yusaku)
+
   AMBARI-606. Refactor "review and deploy" Javascript code for reuse (yusaku)
 
   AMBARI-605. Add UI flow/groundwork for handling Ambari / Hadoop stack version

Modified: incubator/ambari/trunk/hmc/html/_router.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/_router.php?rev=1358427&r1=1358426&r2=1358427&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/_router.php (original)
+++ incubator/ambari/trunk/hmc/html/_router.php Fri Jul  6 21:20:42 2012
@@ -56,11 +56,11 @@ function redirectToPage($requestPage, $t
 
 $logger = new HMCLogger("Router");
 $db = new HMCDBAccessor($GLOBALS["DB_PATH"]);
-$appDir = "/hmc/html";
+$appDir = "/hmc/html/";
 
 $res = $db->getAllClusters();
 $clusters = $res['clusters'];
-$requestPage = basename(preg_replace('/\?.*/', '', $_SERVER['REQUEST_URI']));
+$requestPage = str_replace($appDir, '', $_SERVER['SCRIPT_NAME']);
 $logger->log_trace('requestPage=' . $requestPage);
 
 if (sizeof($clusters) == 0) {

Modified: incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php?rev=1358427&r1=1358426&r2=1358427&view=diff
==============================================================================
--- incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php (original)
+++ incubator/ambari/trunk/hmc/html/upgradeStack/_stageMenu.php Fri Jul  6 21:20:42 2012
@@ -19,17 +19,17 @@
 */
 
 switch ($requestPage) {
-  case 'uninstall.php':
+  case 'upgradeStack/uninstall.php':
     $uninstallStageClass = 'current';
     $reconfigureStageClass = 'unvisited';
     $deployStageClass = 'unvisited';
     break;
-  case 'reconfigure.php':
+  case 'upgradeStack/reconfigure.php':
     $uninstallStageClass = 'visited';
     $reconfigureStageClass = 'current';
     $deployStageClass = 'unvisited';
     break;
-  case 'deploy.php':
+  case 'upgradeStack/deploy.php':
     $uninstallStageClass = 'visited';
     $reconfigureStageClass = 'visited';
     $deployStageClass = 'current';



Mime
View raw message