瀏覽代碼

AMBARI-252. Remove Playground files from HMC

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/ambari-186@1339776 13f79535-47bb-0310-9956-ffa450edef68
Ramya Sunil 13 年之前
父節點
當前提交
f28ffe056d

+ 2 - 0
CHANGES.txt

@@ -2,6 +2,8 @@ Ambari Change log
 
 Release 0.x.x - unreleased
 
+  AMBARI-252. Remove Playground files from HMC (Varun Kapoor via ramya)
+
   AMBARI-266. add select/unselect all buttons to the select services page 
   (Vinod via ramya)
 

+ 0 - 41
hmc/html/cluster.php

@@ -1,41 +0,0 @@
-<html>
-  <head>
-    <title id="pageTitleId">Hortonworks Data Platform Portal</title>
-
-    <?php require "./css_includes.html"; ?>
-  </head>
-
-  <body>
-    <?php require "./header.html"; ?>
-    <hr/>
-
-    <div name="ContentDiv" id="ContentDivId" class="yui3-skin-sam"> 
-
-      <!-- Navigation bar -->
-      <div name="navigationBarDiv" id="navigationBarDivId">
-        <div name="navigationBarContentDiv" id="navigationBarContentDivId">
-        <a href="index.php">Clusters</a>
-        </div>
-      <hr/>
-      </div>
- 
-      <div name="displayServiceStatusCoreDiv" id="displayServiceStatusCoreDivId" style="display:block">
-        <div name="displayServiceStatusContentDiv" id="displayServiceStatusContentDivId" >
-        </div>
-      </div>
-    </div>
-
-    <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-    <!-- <script src="../js/global.js"></script> -->
-    <script src="../js/serviceStatus.js"></script>
-    <script>
-       getServicesStatus('<?php echo $_GET['clusterId']; ?>');
-    </script>
-
-    <?php echo("hello"); ?>
-    <?php echo("<a href='displayInstallLogs.php?clusterId=" . $_GET['clusterId'] . "'>Installation logs</a>"); ?>
-  </body>
-  <hr/>
-  <?php require "./footer.html"; ?>
-</html>
-

+ 0 - 56
hmc/html/displayLogs.php

@@ -1,56 +0,0 @@
-<html>
-  <head>
-    <title id="pageTitleId">Hortonworks Data Platform Portal</title>
-
-    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css"> 
-    <link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
-    <link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
-  </head>
-
-  <body>
-    <header>
-    <img src="./logo.jpg"/>
-    <section id="headerText">Hortonworks Data Platform</section>
-    </header>
-    <hr/>
-
-    <div name="ContentDiv" id="ContentDivId" >
-
-<!--
-<div name="servicesListDiv" id="servicesListDivId">
-  <div>Service Name</div>
-  <div>Status</div>
-</div>
--->
-
-                <div name="displayLogsCoreDiv" id="displayLogsCoreDivId" style="display:none">
-                  <div name="displayLogsContentDiv" id="displayLogsContentDivId"> 
-                  </div>
-                  <div name="installDoneDiv" id="installDoneDivId" style="display:none"> 
-                    <p>
-                    <input type="button" name="installDoneButton" id="installDoneButtonId" value="Install Completed" class="submitButton">
-                    </p>
-                  </div>
-                </div>
-
-
-<!--
-      <div name="displayLogsDiv" id="displayLogsDivId">
-        <p><b>Checking status for all services</b></p>
-      </div>
--->
-    </div> <!-- end content div -->
-
-      <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-      <script src="../js/displayLogs.js"></script>
-
-      <script type="text/javascript">
-         YUI().use("event", function (Y) { 
-           getGsInstallLogs(Y, "MyCluster-12345");
-         });
-      </script>
-  </body>
-  <hr/>
-  <footer></footer>
-</html>
-

+ 0 - 278
hmc/html/dummyInitializeCluster.php

@@ -1,278 +0,0 @@
-<html>
-  <head>
-    <title id="pageTitleId">Hortonworks Data Platform Portal</title>
-
-    <?php require "./css_includes.html"; ?>
-  </head>
-
-  <body class="yui3-skin-sam">
-    <?php require "./header.html"; ?>
-    <hr/>
-
-    <div name="ContentDiv" id="ContentDivId"> 
-
-      <!-- Navigation bar -->
-      <div name="navigationBarDiv" id="navigationBarDivId">
-        <div name="navigationBarContentDiv" id="navigationBarContentDivId">
-        <a href="index.php">Clusters</a>
-        </div>
-      <hr/>
-      </div>
-      <!-- List of clusters
-      <div name="clustersListDiv" id="clustersListDivId">
-      </div>
-      -->
-
-      <!-- Installation Wizard -->
-      <div name="installationWizardDiv" id="installationWizardDivId" style="display:block">
-        <div name="installationWizardProgressBarDiv" id="installationWizardProgressBarDivId">
-          <ol id="installationWizardProgressBarListId">
-            <li id="createClusterStageId" class="installationWizardFirstStage installationWizardCurrentStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  1   
-                </span>
-                Create Cluster
-              </div>
-            </li>
-            <li id="initializeClusterStageId" class="installationWizardUnvisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  2   
-                </span>
-                Initialize Cluster
-              </div>
-            </li>
-            <li id="assignHostsStageId" class="installationWizardUnvisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  3   
-                </span>
-                Assign Hosts
-              </div>
-            </li>
-            <li id="configureClusterStageId" class="installationWizardUnvisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  4   
-                </span>
-                Configure Cluster
-              </div>
-            </li>
-            <li id="configureClusterAdvancedStageId" class="installationWizardUnvisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  5   
-                </span>
-                Configure Cluster (Advanced)
-              </div>
-            </li>
-            <li id="deployClusterStageId" class="installationWizardLastStage installationWizardUnvisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  6   
-                </span>
-                Deploy Cluster
-              </div>
-            </li>
-          </ol>
-        </div>
-        
-        <br/>
-        
-        <div name="installationMainFormsDiv" id="installationMainFormsDivId">
-
-          <!-- Used to render informational/status messages (error, success reports and such like) -->
-          <div id="displayProgressStatusDivId" style="display:none"></div>
-          
-          <br/>
-
-          <div name ="createClusterCoreDiv" id="createClusterCoreDivId" style="display:none">
-            <form id="createClusterFormId" >
-              <fieldset>
-                <legend>Create Cluster</legend>
-                <label for="clusterNameId">Enter a name for your cluster</label>
-                <input type="text" name="clusterName" id="clusterNameId" value="">
-              </fieldset>
-            </form>
-                <br/>
-                <p>
-                <input type="button" name="createClusterSubmitButton" id="createClusterSubmitButtonId" value="Create Cluster" class="submitButton">
-                </p>
-              </div>
-
-              <div name="initializeClusterCoreDiv" id="initializeClusterCoreDivId" style="display:none">
-
-                <fieldset>
-                  <legend>Hosts file and credentials</legend>
-                  <form id="initializeClusterFilesFormId" enctype="multipart/form-data" method="post">
-                    <p>
-                    <label for="clusterDeployUserId">Cluster Deploy User</label>
-                    <input type="text" name="clusterDeployUser" id="clusterDeployUserId" value="root" placeholder="">
-                    </p>
-                    <br/>
-                    <p>
-                    <label for="clusterDeployUserIdentityFileId">Cluster Deploy User Identity File</label>
-                    <input type="file" name="clusterDeployUserIdentityFile" id="clusterDeployUserIdentityFileId" value="" placeholder="">
-                    </p>
-                    <br/>
-                    <p>
-                    <label for="clusterHostsFileId">Cluster Hosts File</label>
-                    <input type="file" name="clusterHostsFile" id="clusterHostsFileId" value="" placeholder="">
-                    </p>
-
-                    <iframe name="fileUploadTarget" id="fileUploadTargetId" src="" style="display:none"></iframe>
-
-                  </form>
-                </fieldset>
-
-                <br/>
-
-                <fieldset>
-                  <legend>Select Services</legend>
-                  <form id="initializeClusterDataFormId">
-                    <p>
-                    <label for="installMapReduce">MapReduce</label>
-                    <input type="checkbox" name="installMR" id="installMRId" value="installMapReduceValue" disabled="disabled" checked="yes">
-                    </p>
-                    <p>
-                    <label for="installHdfs">HDFS</label>
-                    <input type="checkbox" name="installHDFS" id="installHDFSId" value="installHdfsValue" disabled="disabled" checked="yes">
-                    </p>
-                    <p>
-                    <label for="installHBaseId">HBase</label>
-                    <input type="checkbox" name="installHBase" id="installHBaseId" value="installHBaseValue">
-                    </p>
-                    <p>
-                    <label for="installHCatalogId">HCatalog</label>
-                    <input type="checkbox" name="installHCatalog" id="installHCatalogId" value="installHCatalogValue">
-                    </p>
-                    <p>
-                    <label for="installTempletonId">Templeton</label>
-                    <input type="checkbox" name="installTempleton" id="installTempletonId" value="installTempletonValue">
-                    </p>
-                    <p>
-                    <label for="installOozieId">Oozie</label>
-                    <input type="checkbox" name="installOozie" id="installOozieId" value="installOozieValue">
-                    </p>
-                    <p>
-                    <label for="installPigId">Pig</label>
-                    <input type="checkbox" name="installPig" id="installPigId" value="installPigValue">
-                    </p>
-                    <p>
-                    <label for="installSqoopId">Sqoop</label>
-                    <input type="checkbox" name="installSqoop" id="installSqoopId" value="installSqoopValue">
-                    <p>
-                  </form>
-                </fieldset>
-                <br/>
-                <p>
-                <input type="button" name="initializeClusterSubmitButton" id="initializeClusterSubmitButtonId" value="Initialize" class="submitButton">
-                </p>
-              </div>
-
-              <div name="assignHostsCoreDiv" id="assignHostsCoreDivId" style="display:none">
-                <form id="assignHostsFormId">
-                  <fieldset id="assignHostsFieldSetId">
-                    <legend>Select master hosts</legend>
-                    <div id="assignHostsDynamicRenderDivId"></div>
-                  </fieldset>
-                  <p>
-                  <input type="button" name="assignHostsSubmitButton" id="assignHostsSubmitButtonId" value="submit" class="submitButton">
-                  </p>
-                </form>
-              </div>
-
-              <div name="configureClusterCoreDiv" id="configureClusterCoreDivId" style="display:none">
-
-                <div name="configureClusterInputDiv" id="configureClusterInputDivId">
-                  <form id="configureClusterFormId">
-                    <fieldset id="configureClusterInputFieldSetId">
-                      <legend>Select mount points</legend>
-                      <div name="configureClusterMountPointsInputDiv" id="configureClusterMountPointsInputDivId">
-                        <div id="configureClusterMountPointsDynamicRenderDivId"></div>
-                        <p>
-                          <label for="customMountPoints">Custom mount points</label>
-                          <input type="text" name="customMountPoints" id="customMountPointsId" value="" placeholder="Comma-Separated List">
-                        </p>
-                      </div>  
-                      <!-- Additional <div>s for other categories of cluster configuration go here -->
-                    </fieldset>
-                    <p>
-                    <input type="button" name="configureClusterSubmitButton" id="configureClusterSubmitButtonId" value="Submit" class="submitButton">
-                    </p>
-                  </form>
-                </div>
-
-                  <br/>
-
-                  <div name="configureClusterDisplayDiv" id="configureClusterDisplayDivId">
-                    <fieldset>
-                      <legend>Effective mount points</legend>
-                      <div name="configureClusterMountPointsDisplayDiv" id="configureClusterMountPointsDisplayDivId">
-                      </div>
-                    </fieldset>
-                  </div>
-                </div>
-
-                <div name="configureClusterAdvancedCoreDiv" id="configureClusterAdvancedCoreDivId" style="display:none">
-                  <form id="configureClusterAdvancedFormId">
-                    <fieldset id="configureClusterAdvancedFieldSetId">
-                      <legend>Advanced configuration</legend>
-                      <div id="configureClusterAdvancedDynamicRenderDivId"></div>
-                    </fieldset>
-                    <p>
-                    <input type="button" name="configureClusterAdvancedSubmitButton" id="configureClusterAdvancedSubmitButtonId" value="Submit" class="submitButton">
-                    </p>
-                  </form>
-                </div>
-
-                <div name="deployCoreDiv" id="deployCoreDivId" style="display:block">
-                  <form id="deployFormId">
-                    <fieldset id="deployFieldSetId">
-                      <legend>Review your settings</legend>
-                      <div id="deployDynamicRenderDivId"></div>
-                    </fieldset>
-                    <p>
-                    <input type="button" name="deploySubmitButton" id="deploySubmitButtonId" value="Deploy" class="submitButton">
-                    </p>
-                  </form>
-                </div>
-
-                <div name="displayProgressCoreDiv" id="displayProgressCoreDivId" style="display:none">
-                  <fieldset id="displayProgressFieldSetId">
-                    <legend>Deploy Progress</legend>
-                    <div id="displayProgressDynamicRenderDivId"></div>
-                  </fieldset>
-                </div>
-
-              </div>
-            </div>
-            <!-- End of installation Wizard -->
-
-            <div id="loadingDivId">
-              <img id="loadingImgId" src="../images/loadingLarge.gif" style="display:none"/>
-            </div>
-
-            <!-- Placeholder for our informational YUI Panel. -->
-            <div id="informationalPanelContainerDivId">
-              <div class="yui3-widget-hd"></div>
-              <div class="yui3-widget-bd"></div>
-              <div class="yui3-widget-ft"></div>
-            </div>
-
-            <hr/>
-            <?php require "./footer.html"; ?>
-
-            <?php require "./js_includes.html"; ?>
-
-            <script type="text/javascript">
-
-              YUI().use("node", "io", "dump", "json", "arraysort", "panel", "event", function (Y) {
-                Y.log("starting up");
-                renderDeploy(Y, {clusterName: 'rez3'});
-              });
-
-            </script>
-          </body>
-        </html> 

+ 0 - 39
hmc/html/expandTab.html

@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html>
-  <head>
-    <meta charset="UTF-8">
-    <title>Test</title>
-  </head>
-  <body>
-    <p>
-    Here is opening info.
-    </p>
-    <p class="supplementalInfo">
-    Here is supplemental info.
-    </p>
-    <p>
-    This approach uses Progressive Enhancement.
-    </p>
-    <p class="supplementalInfo">
-    Progressive Enhancement allows content to be accessible to all, while also
-    providing an enhanced version to those that can handle it.
-    </p>
-    <script type="text/javascript" src="http://yui.yahooapis.com/3.0.0/build/yui/yui-min.js"></script>
-    <script type="text/javascript">
-      YUI().use('node', function (Y) {
-          function toggle(n, link) {
-          var visible = (n.getStyle('display') == 'block');
-          n.setStyle('display', (visible ? 'none' : 'block'));
-          link.set('innerHTML', (visible ? 'MORE' : 'LESS'));
-          }
-          Y.all('.supplementalInfo').each(function () {
-            var n = this,
-            c = Y.Node.create('<div><a href="#">MORE</a></div>');
-            c.one('a').on('click', function (e) { e.preventDefault(); toggle(n, this); });
-            n.insert(c, 'after');
-            n.setStyle('display', 'none');
-            });
-          });
-    </script>
-  </body>
-</html>

+ 0 - 102
hmc/html/history.html

@@ -1,102 +0,0 @@
-<html>
-  <head>
-  </head>
-
-  <body>
-    <button id="THE_BUTTON">
-      Submit
-    </button>
-
-    <div id="THE_DIV"></div>
-
-    <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-    <script type="text/javascript">
-      
-      YUI().use("node", "io", "dump", "json", "history", "event", function (Y) { 
-        
-        var currentScreen = 0;
-
-        var history = new Y.History();
-
-        function isEmptyObject( theObject ) {
-
-          for( var key in theObject ) {
-            if( theObject.hasOwnProperty( key ) ) {
-              return false;
-            }
-          }
-
-          return true;
-        }
-
-        function renderDiv( screenToDisplay ) {
-          /*
-          var divData = history.get();
-
-          var screenToDisplay;
-
-          if( isEmptyObject( divData ) ) {
-            Y.log("Empty object");
-
-            screenToDisplay = currentScreen;
-          }
-          else {
-            Y.log(Y.Lang.dump(divData));
-
-            screenToDisplay = divData.screen;
-          }
-          */
-
-          Y.one('#THE_DIV').setContent('<h1>' + screenToDisplay + '</h1>');
-        }
-
-        Y.one("#THE_BUTTON").on( "click", function(e) {
-          
-          Y.log("clicked");
-
-          currentScreen++;
-
-          /* Update THE_DIV. */
-          renderDiv(currentScreen);
-
-          history.add({'screen' : currentScreen - 1 }, {'merge' : false});
-        });
-
-        history.on('change', function(e) {
-
-          Y.log(Y.Lang.dump(e.src));
-
-          if ((e.src === Y.HistoryHash.SRC_HASH) || (e.src === Y.HistoryHTML5.SRC_POPSTATE)) {
-
-            var screenToDisplay;
-
-            var divData = history.get();
-
-            if( isEmptyObject( divData ) ) {
-              Y.log("Empty object");
-
-              screenToDisplay = currentScreen;
-            }
-            else {
-              Y.log(Y.Lang.dump(divData));
-
-              screenToDisplay = divData.screen;
-            }
-
-            renderDiv(screenToDisplay);
-
-//            for( var k in e ) {
-//              if( e.hasOwnProperty(k) ) {
-//                Y.log( k + '->' + Y.Lang.dump(e[k]) );
-//              }
-//            }
-          }
-        });
-
-        /* Initial render. */
-        renderDiv( currentScreen );
-
-      });
-    </script>
-  </body>
-</html>

+ 0 - 119
hmc/html/rez.html

@@ -1,119 +0,0 @@
-<html>
-  <head>
-    <title id="pageTitleId">Hortonworks Data Platform Portal</title>
-
-    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css"> 
-    <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/rez.css" media="screen"/>
-  </head>
-
-  <body>
-    <header>
-    <img src="./logo.jpg"/>
-    <section id="headerText">Hortonworks Data Platform</section>
-    </header>
-    <hr/>
-
-    <div name="ContentDiv" id="ContentDivId" > 
-      <div name="installationWizardDiv" id="installationWizardDivId">
-        <div name="installationWizardProgressBarDiv" id="installationWizardProgressBarDivId">
-          <ol id="installationWizardProgressBarListId">
-            <li id="createClusterStageId" class="installationWizardFirstStage installationWizardVisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  1   
-                </span>
-                Create Cluster
-              </div>
-            </li>
-            <li id="initializeClusterStageId" class="installationWizardVisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  2   
-                </span>
-                Initialize Cluster
-              </div>
-            </li>
-            <li id="assignHostsStageId" class="installationWizardCurrentStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  3   
-                </span>
-                Assign Hosts
-              </div>
-            </li>
-            <li id="configureClusterStageId" class="installationWizardUnvisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  4   
-                </span>
-                Configure Cluster
-              </div>
-            </li>
-            <li id="deployClusterStageId" class="installationWizardLastStage installationWizardUnvisitedStage">
-              <div>
-                <span class="installationWizardStageNumber">
-                  5   
-                </span>
-                Deploy Cluster
-              </div>
-            </li>
-          </ol>
-        </div>
-        <div name="installationMainFormsDiv" id="installationMainFormsDivId">
-
-        <input type="button" name="nextStageButton" id="nextStageButtonId" value="Next Stage" class="submitButton">
-        <!-- Test divs here -->
-
-          <div name="configureClusterCoreDiv" id="configureClusterCoreDivId" style="display:none">
-
-            <div name="configureClusterInputDiv" id="configureClusterInputDivId">
-              <form id="configureClusterFormId">
-                <fieldset id="configureClusterInputFieldSetId">
-                  <legend>Configure Cluster</legend>
-                  <h3> Select Mount Points To Use </h3>
-                  <div name="configureClusterMountPointsInputDiv" id="configureClusterMountPointsInputDivId">
-                    <p>
-                    <label for="customMountPoints">(Additional) Custom Mount Points</label>
-                    <input type="text" name="customMountPoints" id="customMountPointsId" value="" placeholder="Comma-Separated List">
-                    </p>
-                  </div>  
-                  <!-- Additional <div>s for other categories of cluster configuration go here -->
-                    <p>
-                    <input type="button" name="configureClusterSubmitButton" id="configureClusterSubmitButtonId" value="Configure Cluster" class="submitButton">
-                    </p>
-                  </fieldset>
-                </form>
-              </div>
-
-              <br/>
-
-              <div name="configureClusterDisplayDiv" id="configureClusterDisplayDivId">
-                <fieldset id="configureClusterDisplayFieldSetId">
-                  <legend>Effective Config Values</legend>
-                  <div name="configureClusterMountPointsDisplayDiv" id="configureClusterMountPointsDisplayDivId">
-                  </div>
-                </fieldset>
-              </div>
-            </div>
-
-
-        </div>
-
-
-      <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-      <script src="../js/rez.js"></script>
-      <!--
-      <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-      <script src="../js/createCluster.js"></script>
-      <script src="../js/initializeCluster.js"></script>
-      <script src="../js/assignHosts.js"></script>
-      <script src="../js/configureCluster.js"></script>
-      <script src="../js/deploy.js"></script>
-      -->
-
-    </body>
-    <hr/>
-    <footer>Hortonworks &copy; 2012</footer>
-  </html> 

+ 0 - 55
hmc/html/rez.html.old

@@ -1,55 +0,0 @@
-<html>
-  <head>
-    <title id="pageTitleId">HDP Initialize Cluster</title>
-
-    <link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
-    <link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
-  </head>
-
-  <body>
-
-    <div name="configureClusterCoreDiv" id="configureClusterCoreDivId" style="display:none">
-
-      <div name="configureClusterInputDiv" id="configureClusterInputDivId">
-        <form id="configureClusterFormId">
-          <fieldset id="configureClusterFieldSetId">
-            <h3> Select Mount Points To Use </h3>
-            <div name="configureClusterMountPointsInputDiv" id="configureClusterMountPointsInputDivId">
-              <p>
-                <label for="customMountPointsId">(Additional) Custom Mount Points</label>
-                <input type="text" name="customMountPoints" id="customMountPointsId" value="" placeholder="Comma-Separated List">
-              </p>
-            </div>  
-            <!-- Additional <div>s for other categories of cluster configuration go here -->
-          </fieldset>
-          <p>
-            <input type="button" name="configureClusterSubmitButton" id="configureClusterSubmitButtonId" value="Configure Cluster">
-          </p>
-        </form>
-      </div>
-
-      <br/>
-
-      <div name="configureClusterDisplayDiv" id="configureClusterDisplayDivId">
-        <fieldset id="configureClusterDisplayFieldSetId">
-        <legend>Effective Config Values</legend>
-          <div name="configureClusterMountPointsDisplayDiv" id="configureClusterMountPointsDisplayDivId">
-          </div>
-        </fieldset>
-      </div>
-    </div>
-
-    <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-    <script src="../js/rezConfigureCluster.js"></script>
-    <script type="text/javascript">
-    YUI().use("node", "io", "dump", "json", "arraysort", "event", function (Y) { 
-
-        Y.one("#configureClusterCoreDivId").setStyle('display','block');
-
-        renderConfigureCluster(Y, {"mountPoints":["\/grid\/0","\/grid\/1","\/grid\/2","\/grid\/3"],"servicesInfo":[{"keyName":"nameNodeDataDir","displayName":"NameNode Data Directories","maxDirectoriesNeeded":4,"suffix":"hadoop\/hdfs\/namenode"},{"keyName":"dataNodeDataDir","displayName":"DataNode Data Directories","maxDirectoriesNeeded":4,"suffix":"hadoop\/hdfs\/data"},{"keyName":"mapReduceDataDir","displayName":"MapReduce Data Directories","maxDirectoriesNeeded":4,"suffix":"hadoop\/mapred"},{"keyName":"oozieDbDir","displayName":"Oozie DB Directory","maxDirectoriesNeeded":1,"suffix":"hadoop\/oozie"},{"keyName":"zooKeeperDataDir","displayName":"ZooKeeper Data Directory","maxDirectoriesNeeded":1,"suffix":"hadoop\/zookeeper"}]} );
-
-      });
-    </script>
-
-  </body>
-</html> 

+ 0 - 45
hmc/html/serviceStatus.html

@@ -1,45 +0,0 @@
-<html>
-  <head>
-    <title id="pageTitleId">Hortonworks Data Platform Portal</title>
-
-    <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css"> 
-    <link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
-    <link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
-  </head>
-
-  <body>
-    <header>
-    <img src="./logo.jpg"/>
-    <section id="headerText">Hortonworks Data Platform</section>
-    </header>
-    <hr/>
-
-    <div name="ContentDiv" id="ContentDivId" >
-
-<!--
-<div name="servicesListDiv" id="servicesListDivId">
-  <div>Service Name</div>
-  <div>Status</div>
-</div>
--->
-
-      <div name="serviceStatusDiv" id="serviceStatusDivId">
-        <p><b>Checking status for all services</b></p>
-         
-      </div>
-
-    </div> <!-- end content div -->
-
-      <script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-      <script src="../js/serviceStatus.js"></script>
-
-      <script type="text/javascript">
-         YUI().use("node", "io", "dump", "json", "arraysort", "event", function (Y) { 
-           getServiceStatus(Y, "MyCluster-12345");
-         });
-      </script>
-  </body>
-  <hr/>
-  <footer></footer>
-</html>
-

+ 0 - 49
hmc/html/summary.html

@@ -1,49 +0,0 @@
-<html>
-
-<head>
-  <title id="pageTitleId">HDP Summay for Deploy Cluster</title>
-  <link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
-  <link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
-</head>
-
-<body>
-<div>
-  Services to be installed
-  <p><label>HBase</label><input type="text" name="HBase" readonly=readonly value=xxx></p>
-  <p><label>HCatalog</label><input type="text" name="HCatalog" readonly=readonly value=xxx></p>
-  <p><label>Templeton</label><input type="text" name="Templeton" readonly=readonly value=xxx></p>
-  <p><label>Oozie</label><input type="text" name="Oozie" readonly=readonly value=xxx></p>
-  <p><label>Pig</label><input type="text" name="Pig" readonly=readonly value=xxx></p>
-  <p><label>Sqoop</label><input type="text" name="Sqoop" readonly=readonly value=xxx></p>
-</div>
-<div>
-  Host details
-  <div>Jobtracker<input type="text" name="" readonly=readonly value=xxx></div>
-  <div>Namenode<input type="text" name="" readonly=readonly value=xxx></div>
-  <div>Secondary Namenode<input type="text" name="" readonly=readonly value=xxx></div>
-  <div>HBase Master<input type="text" name="" readonly=readonly value=xxx></div>
-  <div>HCatalog<input type="text" name="" readonly=readonly value=xxx></div>
-  <div>Ganglia Collector<input type="text" name="" readonly=readonly value=xxx></div>
-  <div>Nagios Server<input type="text" name="" readonly=readonly value=xxx></div>
-</div>
-
-<div>
-  Confirm Mount Points
-  <div>Mount 1<input type="text" name="1 mount point" readonly=readonly value=xxx></div>
-  <div>Mount 2<input type="text" name="2 mount point" readonly=readonly value=xxx></div>
-  <div>Mount 3<input type="text" name="3 mount point" readonly=readonly value=xxx></div>
-  <div>Mount 4<input type="text" name="4 mount point" readonly=readonly value=xxx></div>
-</div>
-
-<div>
-Confirm all configuration
-  <div>Namenode Heap Size<input type="text" name="Namenode heap size" readonly=readonly value=xxx></div>
-  <div>Jobtracker Heap Size<input type="text" name="Jobtracker heap size" readonly=readonly value=xxx></div>
-  <div>HBase Master Heap Size<input type="text" name="HBase Master heap size" readonly=readonly value=xxx></div>
-  <div>Hadoop Heap Size<input type="text" name="Hadoop Heap Size" readonly=readonly value=xxx></div>
-  <div> Data Node Heap Size<input type="text" name="Data Node Heap Size" readonly=readonly value=xxx></div>
-</div>
-
-</body>
-
-</html>

+ 0 - 124
hmc/html/tempHostMapping.html

@@ -1,124 +0,0 @@
-<html>
-<head>
-  <link rel="stylesheet" type="text/css" href="../css/selectHosts.css"/>
-<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-<script type="text/javascript">
-
-var currentMaster="";
-var nodeGroups = [ "A", "B"];
-var serviceMasters = [ "NameNode", "JobTracker" , "HBaseMaster" ]
-var slotContents = {};
-var serviceLocations = {};
-
-function renderSlots(Y) {
-  for (nodeGroupIndex in nodeGroups) {
-    for (serviceMasterIndex in serviceMasters) {
-      var content= "";
-      var thisId = 'slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex;
-      for (master in slotContents[thisId]) {
-        content += master + "<br/>";
-      }
-      Y.one('#' + thisId).setContent(content);
-    }
-  }
-}
-
-YUI().use("node", "io", "dump", "json", "event", "stylesheet", function (Y) {
-
-  ////////////////// Render service links ///////////////////
-  var serviceMastersLinksMarkup ="";
-  for (key in serviceMasters) {
-    serviceMastersLinksMarkup += '<div id="' + serviceMasters[key] + '" class="aServiceMasterLink">' + serviceMasters[key] + '</div><br/>';
-  }
-  Y.one("#serviceMastersLinksDivId").setContent(serviceMastersLinksMarkup);
-  ////////////////// End of rendering service links ////////
-
-  ////////////////// Register click handlers for all masters ///////////////////
-  for (key in serviceMasters) {
-    var serviceLinkId = "#" + serviceMasters[key];
-    Y.one(serviceLinkId).on('click', function(e) {
-      if ( currentMaster != this.get('id')) {
-        activate(Y, this.get('id'));
-      }
-    });
-  }
-  ////////////////// End of registering click handlers for all masters ///////////////////
-
-  ////////////////// Render node groups ////////
-  var nodeGroupsMarkup = '<div id="nodeGroupsTable">';
-  for (nodeGroupIndex in nodeGroups) {
-    nodeGroupsMarkup += '<div id="' + nodeGroups[nodeGroupIndex] + '" class="aNodeGroup"> <p>Node group ' + nodeGroups[nodeGroupIndex] + '</p>';
-    
-    // Number of boxes equal to number of service-masters
-    for (serviceMasterIndex in serviceMasters) {
-      nodeGroupsMarkup += '<div id="slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex + '" class="slot"></div>';
-    } 
-    nodeGroupsMarkup += '</div>'; 
-  }
-  nodeGroupsMarkup += '</div>';
-  Y.one("#nodeGroupsDivId").setContent(nodeGroupsMarkup);
-  ////////////////// End of rendering node groups ////////
-
-  // Register click handlers for all node-slots
-  for (nodeGroupIndex in nodeGroups) {
-    for (serviceMasterIndex in serviceMasters) {
-      var slotDivId = '#slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex;
-      Y.log("registering for " + slotDivId);
-      Y.one(slotDivId).on('click', function(e) {
-          Y.log("Clicked on " + this.get('id'));
-          //Y.log(currentMaster + " " + nodeGroups[nodeGroupIndex] + " " + serviceMasterIndex);
-          //Y.log('#slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex);
-          //Y.one('#slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex).setContent("hello");
-          // this.setContent(serviceMasters[currentMaster]);
-          var oldSlotId = serviceLocations[currentMaster];
-          if (oldSlotId != this.get('id')) {
-            delete slotContents[oldSlotId][currentMaster];
-            serviceLocations[currentMaster] = this.get('id');
-            if (slotContents[this.get('id')] === undefined) {
-              slotContents[this.get('id')] = {};
-            }
-            slotContents[this.get('id')][currentMaster] = [currentMaster];
-            renderSlots(Y);
-          }
-    });
-    }
-  }
-
-  ////////////////// Initialize all slots ///////////////////
-  var thisId = 'slotForGroup' + nodeGroups[0] + 0;
-  for (serviceMasterIndex in serviceMasters) {
-    if (slotContents[thisId] === undefined) {
-      slotContents[thisId] = {};
-    }
-    var masterName = serviceMasters[serviceMasterIndex];
-    slotContents[thisId][masterName] = masterName;
-    serviceLocations[masterName] = thisId;
-  }
-  renderSlots(Y);
-  ////////////////// End of initializing all slots ///////////////////
-});
-
-function activate(Y, serviceMaster) {
-  Y.log("Activated " + serviceMaster + " from " + currentMaster);
-  Y.one("#" + serviceMaster).replaceClass("aServiceMasterLink", "aServiceMasterLinkVisited");
-  if (currentMaster != "") {
-    Y.one("#" + currentMaster).replaceClass("aServiceMasterLinkVisited", "aServiceMasterLink");
-  }
-  currentMaster = serviceMaster;
-}
-
-</script>
-</head>
-
-<body>
-<div id="statusDivId">
-</div>
-
-<p>Services, Node Groups</p>
-<div id="serviceMastersLinksDivId">
-</div>
-<div id="nodeGroupsDivId">
-</div>
-
-</body>
-</html>

+ 0 - 115
hmc/html/tempHostMapping2.html

@@ -1,115 +0,0 @@
-<html>
-<head>
-  <link rel="stylesheet" type="text/css" href="../css/selectHosts.css"/>
-<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
-<script type="text/javascript">
-
-var currentMaster="";
-var nodeGroups = [ "A", "B"];
-var serviceMasters = [ "NameNode", "JobTracker" , "HBaseMaster" ]
-var slotContents = {};
-var serviceLocations = {};
-
-function renderSlots(Y) {
-  for (nodeGroupIndex in nodeGroups) {
-    for (serviceMasterIndex in serviceMasters) {
-      var content= "";
-      var thisId = 'slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex;
-      for (master in slotContents[thisId]) {
-        content += '<div id="' + master + '" class="masterDiv">' + master + "</div>";
-      }
-      Y.one('#' + thisId).setContent(content);
-    }
-  }
-}
-
-YUI().use("node", "io", "dump", "json", "event", 'dd-drop', 'dd-constrain', 'dd-proxy', function (Y) {
-
-  ////////////////// Render node groups ////////
-  var nodeGroupsMarkup = '<div id="nodeGroupsTable">';
-  for (nodeGroupIndex in nodeGroups) {
-    nodeGroupsMarkup += '<div id="' + nodeGroups[nodeGroupIndex] + '" class="aNodeGroup"> <p>Node group ' + nodeGroups[nodeGroupIndex] + '</p>';
-    
-    // Number of boxes equal to number of service-masters
-    for (serviceMasterIndex in serviceMasters) {
-      nodeGroupsMarkup += '<div id="slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex + '" class="slot"></div>';
-    } 
-    nodeGroupsMarkup += '</div>'; 
-  }
-  nodeGroupsMarkup += '</div>';
-  Y.one("#nodeGroupsDivId").setContent(nodeGroupsMarkup);
-  ////////////////// End of rendering node groups ////////
-
-  ////////////////// Initialize all slots ///////////////////
-  var thisId = 'slotForGroup' + nodeGroups[0] + 0;
-  for (serviceMasterIndex in serviceMasters) {
-    if (slotContents[thisId] === undefined) {
-      slotContents[thisId] = {};
-    }
-    var masterName = serviceMasters[serviceMasterIndex];
-    slotContents[thisId][masterName] = masterName;
-    serviceLocations[masterName] = thisId;
-  }
-  renderSlots(Y);
-  ////////////////// End of initializing all slots ///////////////////
-
-  for (serviceMasterIndex in serviceMasters) {
-    var dd = new Y.DD.Drag({
-      node: Y.one('#' + serviceMasters[serviceMasterIndex])
-    }).plug(Y.Plugin.DDProxy, {
-       //We don't want the node to move on end drag
-       moveOnEnd: false
-    }).plug(Y.Plugin.DDConstrained, {
-       //Keep it inside the work area
-       constrain2node: '#nodeGroupsTable'
-    });
-    //Prevent the default end event (this moves the node back to its start position)
-     dd.on('drag:end', function(e) {
-        e.preventDefault();
-     });
-     /*
-     dd.on('drag:drophit', function(e) {
-       //If we drop on a target, move to its position
-       var xy = e.drop.get('node').getXY();
-       this.get('node').setXY(xy);
-     });
-     */
-  }
-
-  for (nodeGroupIndex in nodeGroups) {
-    for (serviceMasterIndex in serviceMasters) {
-      var thisId = '#slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex;
-      var drop = new Y.DD.Drop({
-        node: thisId
-      });
-      //Listen for a drop:hit on this target
-      drop.on('drop:hit', function(e) {
-        //Now we get the drag instance that triggered the drop hit
-        var draggedItem = e.drag.get('node');
-        var dropPlace = this.get('node');
-        dropPlace.appendChild(draggedItem);
-        serviceLocations[draggedItem.get('id')] = dropPlace.get('id');
-        Y.log("Moved " + draggedItem.get('id') + " to " + dropPlace.get('id'));
-    });
-    }
-  }
-});
-
-function print() {
-  alert("hello");
-}
-
-</script>
-</head>
-
-<body>
-<div id="statusDivId">
-</div>
-
-<p>Services, Node Groups</p>
-<div id="nodeGroupsDivId">
-</div>
-<input type="button" name="selectServiceMastersSubmitButton" id="selectServiceMastersSubmitButtonId" value="Submit" class="submitButton" onclick=print()>
-
-</body>
-</html>

+ 0 - 10
hmc/html/tryRadio.html

@@ -1,10 +0,0 @@
-<html>
-  <head>
-    <title>Try Radio button</title>
-  </head>
-
-  <body>
-    <input type=radio name=r1 value="true">Enable Lzo</input>
-  </body>
-
-</html>

+ 0 - 26
hmc/html/x.html

@@ -1,26 +0,0 @@
-<html>
-  <head>
-    
-  </head>
-  <body>
-    <script type="text/javascript">
-
-    var myObject = {
-      f : foo,
-      b : bar
-    };
-
-    myObject.f();
-
-    function foo()
-    {
-      alert("foo");
-    }
-    function bar()
-    {
-      alert("bar");
-    }
-
-    </script>
-  </body>
-</html>

+ 0 - 1
hmc/html/x.txt

@@ -1 +0,0 @@
-{ "abc" : "def", "ghi" : "jkl" }

+ 0 - 130
hmc/js/assignHosts.js_beforeFancyUI

@@ -1,130 +0,0 @@
-//var globalClusterInfo;
-
-function generateServiceMasterOptions (Y, masterHost, allHosts) {
-
-  var generatedOptions = "<option>" + masterHost + "</option>";
-
-  /* The dropdown hosts are allHosts minus masterHost. */
-  Y.Array.each( allHosts, function(host) {
-
-      if( host != masterHost ) {
-        generatedOptions += "<option>" + host + "</option>";
-      }
-    });
-
-  return generatedOptions;
-}
-
-var registeredAssignHostsEventHandlers = false;
-
-function renderAssignHosts (Y, clusterInfo) {
-
-  //globalClusterInfo = clusterInfo;
-  // REZ XXX Remove.
-  //setNavigationContent(Y, "Clusters > New cluster");
-  //activateStage(Y, "#masterHostsSideBarId");
-
-  if( !registeredAssignHostsEventHandlers ) {
-
-    Y.one('#assignHostsSubmitButtonId').on('click', function (e) {
-        e.target.set('disabled', true);
-
-        var selections = Y.all("#assignHostsFieldSetId select");
-
-        var assignHostsRequestData = {};
-
-        selections.each( function(selection) {
-
-          var selectedHostIndex = selection.get('selectedIndex');
-
-          assignHostsRequestData[ selection.get('name') ] = selection.get('options').item(selectedHostIndex).get('text');
-        });
-
-        Y.io("../php/frontend/assignHosts.php?clusterName="+clusterInfo.clusterName, {
-
-            method: 'POST',
-            data: Y.JSON.stringify(assignHostsRequestData),
-            timeout : 10000,
-            on: {
-                  start: function(x, o) {
-                    showLoadingImg(Y);
-                    //waitPanel.show();
-                  },
-                  complete: function(x, o) {
-                    e.target.set('disabled', false);
-                    hideLoadingImg(Y);
-                    //waitPanel.hide();
-                  },
-
-              success: function (x,o) {
-                    e.target.set('disabled', false);
-                    Y.log("RAW JSON DATA: " + o.responseText);
-
-                    // Process the JSON data returned from the server
-                    try {
-                      clusterConfigJson = Y.JSON.parse(o.responseText);
-                    }
-                    catch (e) {
-                      alert("JSON Parse failed!");
-                      return;
-                    }
-
-                    //Y.log("PARSED DATA: " + Y.Lang.dump(clusterConfigJson));
-
-                    if (clusterConfigJson.result != 0) {
-                      // Error!
-                      alert("Got error!" + clusterConfigJson.error);
-                      return;
-                    }
-
-                    clusterConfigJson = clusterConfigJson.response;
-
-                    /* Done with this stage, transition to the next. */
-                    transitionToNextStage( "#assignHostsCoreDivId", assignHostsRequestData,
-                        "#configureClusterCoreDivId", clusterConfigJson, renderConfigureCluster );
-              },
-              failure: function (x,o) {
-                 e.target.set('disabled', false);
-                alert("Async call failed!");
-              }
-            }
-        });
-    });
-
-    registeredAssignHostsEventHandlers = true;
-  }
-
-  var allHosts = Y.Array( clusterInfo.allHosts.sort(Y.ArraySort.compare) );
-  var servicesInfo = Y.Array( clusterInfo.services );
-
-  var serviceMasterHostsMarkup = "";
-
-  /* Given recommendations for all the services, generate serviceMasterHostsMarkup 
-   * to contain only those that are actually enabled for this cluster.
-   */
-  Y.Array.each(servicesInfo, function(serviceInfo) {
-
-    if( serviceInfo.enabled == true ) {
-
-      Y.Array.each(serviceInfo.masters, function(masterInfo) {
-
-        var masterHostName = masterInfo.name;
-        var masterHostNameID = masterHostName + 'Id';
-
-        /* Inefficient, with all the string concatenations, but clear to read. */
-        serviceMasterHostsMarkup += 
-          '<div id="formElement">' + 
-            '<label for=' + masterHostNameID + '>' + 
-              masterInfo.displayName + ' Host' + 
-            '</label>' + 
-            '<select name=' + masterHostName + ' id=' + masterHostNameID + '>' + 
-              generateServiceMasterOptions(Y, masterInfo.hostName, allHosts) + 
-            '</select>' +
-          '</div>';
-      });
-    }
-  });
-
-  /* Link the newly-generated serviceMasterHostsMarkup into the DOM. */
-  Y.one('#assignHostsDynamicRenderDivId').setContent( serviceMasterHostsMarkup );
-}

+ 0 - 236
hmc/js/assignHosts.js_fancyUIV2

@@ -1,236 +0,0 @@
-//var globalClusterInfo;
-
-function generateServiceMasterOptions (Y, masterHost, allHosts) {
-
-  var generatedOptions = "<option>" + masterHost + "</option>";
-
-  /* The dropdown hosts are allHosts minus masterHost. */
-  Y.Array.each( allHosts, function(host) {
-
-      if( host != masterHost ) {
-        generatedOptions += "<option>" + host + "</option>";
-      }
-    });
-
-  return generatedOptions;
-}
-
-var registeredAssignHostsEventHandlers = false;
-
-function renderAssignHosts (Y, clusterInfo) {
-
-  //globalClusterInfo = clusterInfo;
-  // REZ XXX Remove.
-  //setNavigationContent(Y, "Clusters > New cluster");
-  //activateStage(Y, "#masterHostsSideBarId");
-
-  if( !registeredAssignHostsEventHandlers ) {
-
-    Y.one('#assignHostsSubmitButtonId').on('click', function (e) {
-        e.target.set('disabled', true);
-
-        var selections = Y.all("#assignHostsFieldSetId select");
-
-        var assignHostsRequestData = {};
-
-        selections.each( function(selection) {
-
-          var selectedHostIndex = selection.get('selectedIndex');
-
-          assignHostsRequestData[ selection.get('name') ] = selection.get('options').item(selectedHostIndex).get('text');
-        });
-
-        Y.io("../php/frontend/assignHosts.php?clusterName="+clusterInfo.clusterName, {
-
-            method: 'POST',
-            data: Y.JSON.stringify(assignHostsRequestData),
-            timeout : 10000,
-            on: {
-                  start: function(x, o) {
-                    showLoadingImg(Y);
-                    //waitPanel.show();
-                  },
-                  complete: function(x, o) {
-                    e.target.set('disabled', false);
-                    hideLoadingImg(Y);
-                    //waitPanel.hide();
-                  },
-
-              success: function (x,o) {
-                    e.target.set('disabled', false);
-                    Y.log("RAW JSON DATA: " + o.responseText);
-
-                    // Process the JSON data returned from the server
-                    try {
-                      clusterConfigJson = Y.JSON.parse(o.responseText);
-                    }
-                    catch (e) {
-                      alert("JSON Parse failed!");
-                      return;
-                    }
-
-                    //Y.log("PARSED DATA: " + Y.Lang.dump(clusterConfigJson));
-
-                    if (clusterConfigJson.result != 0) {
-                      // Error!
-                      alert("Got error!" + clusterConfigJson.error);
-                      return;
-                    }
-
-                    clusterConfigJson = clusterConfigJson.response;
-
-                    /* Done with this stage, transition to the next. */
-                    transitionToNextStage( "#assignHostsCoreDivId", assignHostsRequestData,
-                        "#configureClusterCoreDivId", clusterConfigJson, renderConfigureCluster );
-              },
-              failure: function (x,o) {
-                 e.target.set('disabled', false);
-                alert("Async call failed!");
-              }
-            }
-        });
-    });
-
-    registeredAssignHostsEventHandlers = true;
-  }
-
-  var allHosts = Y.Array( clusterInfo.allHosts.sort(Y.ArraySort.compare) );
-  var servicesInfo = Y.Array( clusterInfo.services );
-
-  var serviceMasterHostsMarkup = "";
-
-  /* Given recommendations for all the services, generate serviceMasterHostsMarkup 
-   * to contain only those that are actually enabled for this cluster.
-   */
-  Y.Array.each(servicesInfo, function(serviceInfo) {
-
-    if( serviceInfo.enabled == true ) {
-
-      Y.Array.each(serviceInfo.masters, function(masterInfo) {
-
-        var masterHostName = masterInfo.name;
-        var masterHostNameID = masterHostName + 'Id';
-
-        /* Inefficient, with all the string concatenations, but clear to read. */
-        serviceMasterHostsMarkup += 
-          '<div id="formElement">' + 
-            '<label for=' + masterHostNameID + '>' + 
-              masterInfo.displayName + ' Host' + 
-            '</label>' + 
-            '<select name=' + masterHostName + ' id=' + masterHostNameID + '>' + 
-              generateServiceMasterOptions(Y, masterInfo.hostName, allHosts) + 
-            '</select>' +
-          '</div>';
-      });
-    }
-  });
-
-  /* Link the newly-generated serviceMasterHostsMarkup into the DOM. */
-  Y.one('#assignHostsDynamicRenderDivId').setContent( serviceMasterHostsMarkup );
-
-
-
-///////////////////////// New stuff //////////////
-
-var currentMaster="";
-var nodeGroups = [ "A", "B"];
-var serviceMasters = [ "NameNode", "JobTracker" , "HBaseMaster" ]
-var slotContents = {};
-var serviceLocations = {};
-
-function renderSlots(Y) {
-  for (nodeGroupIndex in nodeGroups) {
-    for (serviceMasterIndex in serviceMasters) {
-      var content= "";
-      var thisId = 'slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex;
-      for (master in slotContents[thisId]) {
-        content += master + "<br/>";
-      }
-      Y.one('#' + thisId).setContent(content);
-    }
-  }
-}
-
-  ////////////////// Render service links ///////////////////
-  var serviceMastersLinksMarkup ="";
-  for (key in serviceMasters) {
-    serviceMastersLinksMarkup += '<div id="' + serviceMasters[key] + '" class="aServiceMasterLink">' + serviceMasters[key] + '</div><br/>';
-  }
-  Y.one("#serviceMastersLinksDivId").setContent(serviceMastersLinksMarkup);
-  ////////////////// End of rendering service links ////////
-
-  ////////////////// Register click handlers for all masters ///////////////////
-  for (key in serviceMasters) {
-    var serviceLinkId = "#" + serviceMasters[key];
-    Y.one(serviceLinkId).on('click', function(e) {
-      if ( currentMaster != this.get('id')) {
-        activate(Y, this.get('id'));
-      }
-    });
-  }
-  ////////////////// End of registering click handlers for all masters ///////////////////
-
-  ////////////////// Render node groups ////////
-  var nodeGroupsMarkup = '<div id="nodeGroupsTable">';
-  for (nodeGroupIndex in nodeGroups) {
-    nodeGroupsMarkup += '<div id="' + nodeGroups[nodeGroupIndex] + '" class="aNodeGroup"> <p>Node group ' + nodeGroups[nodeGroupIndex] + '</p>';
-    
-    // Number of boxes equal to number of service-masters
-    for (serviceMasterIndex in serviceMasters) {
-      nodeGroupsMarkup += '<div id="slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex + '" class="slot"></div>';
-    } 
-    nodeGroupsMarkup += '</div>'; 
-  }
-  nodeGroupsMarkup += '</div>';
-  Y.one("#nodeGroupsDivId").setContent(nodeGroupsMarkup);
-  ////////////////// End of rendering node groups ////////
-
-  // Register click handlers for all node-slots
-  for (nodeGroupIndex in nodeGroups) {
-    for (serviceMasterIndex in serviceMasters) {
-      var slotDivId = '#slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex;
-      Y.log("registering for " + slotDivId);
-      Y.one(slotDivId).on('click', function(e) {
-          Y.log("Clicked on " + this.get('id'));
-          //Y.log(currentMaster + " " + nodeGroups[nodeGroupIndex] + " " + serviceMasterIndex);
-          //Y.log('#slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex);
-          //Y.one('#slotForGroup' + nodeGroups[nodeGroupIndex] + serviceMasterIndex).setContent("hello");
-          // this.setContent(serviceMasters[currentMaster]);
-          var oldSlotId = serviceLocations[currentMaster];
-          if (oldSlotId != this.get('id')) {
-            delete slotContents[oldSlotId][currentMaster];
-            serviceLocations[currentMaster] = this.get('id');
-            if (slotContents[this.get('id')] === undefined) {
-              slotContents[this.get('id')] = {};
-            }
-            slotContents[this.get('id')][currentMaster] = [currentMaster];
-            renderSlots(Y);
-          }
-    });
-    }
-  }
-
-  ////////////////// Initialize all slots ///////////////////
-  var thisId = 'slotForGroup' + nodeGroups[0] + 0;
-  for (serviceMasterIndex in serviceMasters) {
-    if (slotContents[thisId] === undefined) {
-      slotContents[thisId] = {};
-    }
-    var masterName = serviceMasters[serviceMasterIndex];
-    slotContents[thisId][masterName] = masterName;
-    serviceLocations[masterName] = thisId;
-  }
-  renderSlots(Y);
-  ////////////////// End of initializing all slots ///////////////////
-
-function activate(Y, serviceMaster) {
-  Y.log("Activated " + serviceMaster + " from " + currentMaster);
-  Y.one("#" + serviceMaster).replaceClass("aServiceMasterLink", "aServiceMasterLinkVisited");
-  if (currentMaster != "") {
-    Y.one("#" + currentMaster).replaceClass("aServiceMasterLinkVisited", "aServiceMasterLink");
-  }
-  currentMaster = serviceMaster;
-}
-
-
-}

+ 0 - 207
hmc/js/backup_progress.js

@@ -1,207 +0,0 @@
-var tmpY1;
-
-function generateSingleDiscoverProgressStateMarkup( discoverProgressStateTitle, discoverProgressStateCssClass ) {
-
-  tmpY1.log( 'Generating: ' + discoverProgressStateTitle + '-' + discoverProgressStateCssClass );
-
-  var markup = 
-    '<li>' + 
-      '<div class=' + discoverProgressStateCssClass + '>' +
-        discoverProgressStateTitle +
-      '</div>' +
-    '</li>';
-
-    tmpY1.log("XXX" + markup);
-  return markup;
-}
-
-var errorInformationPanel;
-
-function renderProgress (Y, discoverProgressInfo) {
-
-  tmpY1 = Y;
-
-  var discoverProgressDataSource = new Y.DataSource.IO ({
-    source: '../php/frontend/fetchDiscoverProgressInfo.php'
-  });
-
-  discoverProgressDataSource.plug(Y.Plugin.DataSourceJSONSchema, {
-    schema: {
-      metaFields: {
-        progressStates: 'progressStates',
-        currentProgressStateIndex: 'currentProgressStateIndex',
-        encounteredError: 'encounteredError',
-        stateInfo: 'stateInfo',
-        nextStageInfo: 'nextStageInfo'
-      }
-    }
-  });
-
-  var discoverProgressPollHandle = discoverProgressDataSource.setInterval( 3000, {
-    request: '?clusterName=' + discoverProgressInfo.clusterName,
-    callback: {
-      success: function (e) {
-
-        var discoverProgressStates = e.response.meta.progressStates;
-
-//        Y.log(Y.Lang.dump(discoverProgressStates));
-//        Y.log(e.response.meta.currentProgressStateIndex);
-
-        var discoverProgressMarkup = '<ul id=displayProgressStatesListId>';
-
-        var progressStateIndex = 0;
-
-        /* Generate markup for all the "done" states. */
-        for( ; progressStateIndex < e.response.meta.currentProgressStateIndex; ++progressStateIndex ) {
-
-//          Y.log( 'Done loop - ' + progressStateIndex );
-          discoverProgressMarkup += generateSingleDiscoverProgressStateMarkup
-            ( discoverProgressStates[ progressStateIndex ], 'displayProgressStateDone' );
-//            Y.log("Currently, markup is:" + discoverProgressMarkup );
-        }
-
-        if( progressStateIndex < discoverProgressStates.length ) {
-
-//          Y.log( 'In progress - ' + progressStateIndex );
-
-          /* Decide upon what CSS class to assign to the currently-in-progress
-           * state - if an error was marked as having been encountered, assign
-           * the fitting .discoverProgressStateError, else just annoint it with
-           * .discoverProgressStateInProgress 
-           */
-          var currentProgressStateCssClass = 'displayProgressStateInProgress';
-
-          if( e.response.meta.encounteredError ) {
-
-            currentProgressStateCssClass = 'displayProgressStateError';
-          }
-
-          /* Then generate markup for the "in-progress" state. */
-          discoverProgressMarkup += generateSingleDiscoverProgressStateMarkup
-            ( discoverProgressStates[ progressStateIndex ], currentProgressStateCssClass );
-
-          ++progressStateIndex;
-
-          /* Finally, generate markup for all the "pending" states. */
-          for( ; progressStateIndex < discoverProgressStates.length; ++progressStateIndex ) {
-
-//            Y.log( 'Pending loop - ' + progressStateIndex );
-            discoverProgressMarkup += generateSingleDiscoverProgressStateMarkup
-              ( discoverProgressStates[ progressStateIndex ], 'displayProgressStatePending' );
-          }
-        }
-
-        var noNeedForFurtherPolling = false;
-        var installationStatusDivContent = '';
-        var installationStatusDivCssClass = '';
-
-        /* We can break this polling cycle in one of 2 ways: 
-         * 
-         * 1) If all the states have been progressed through.
-         */
-        if( e.response.meta.currentProgressStateIndex == (discoverProgressStates.length) ) {
-
-          noNeedForFurtherPolling = true;
-
-          if ( e.response.meta.encounteredError == true) {
-            installationStatusDivContent = 
-              '<p>' +
-              'We found a few wild ones! Take a look at the' + 
-              '<a href="javascript:void(null)" id="errorInfoLinkId">Error Logs</a>' +
-              '?' +  
-              '</p>';
-
-            installationStatusDivCssClass = 'statusError';
-
-          } else {
-            installationStatusDivContent = 
-            '<p>' +
-              'All done with discovering nodes! ' + 
-              '<a href="javascript:void(null)" id=successInfoLinkId>' + 
-                'Great!' +
-              '</a>' +
-            '</p>';
-          installationStatusDivCssClass = 'statusOk';
-          }
-        }
-
-        if( noNeedForFurtherPolling ) {
-
-          /* We've made all the progress we could have, so stop polling. */
-          discoverProgressDataSource.clearInterval( discoverProgressPollHandle );
-
-          var installationStatusDiv = Y.one('#displayProgressStatusDivId');
-          
-          installationStatusDiv.set('className', installationStatusDivCssClass);
-          installationStatusDiv.setContent(installationStatusDivContent);
-          installationStatusDiv.setStyle('display', 'block');
-
-          /* If we stopped polling due to error, we need to do more work. */
-          if( installationStatusDivCssClass == 'statusError' ) {
-
-            /* Create the panel that'll display our error info. */
-            errorInformationPanel = 
-              createInformationalPanel( Y, '#informationalPanelContainerDivId', 'Deploy Logs' );
-
-            /* Augment errorInformationPanel with the relevant buttons. */
-            var backToInstallationWizardButton = {
-              value: 'I will tame the wild \'uns!',
-              action: function (e) {
-              e.preventDefault();
-              Y.one('#displayProgressStatusDivId').setStyle('display', 'none');
-              Y.one('#displayProgressCoreDivId').setStyle('display', 'none');
-              Y.one('#installationWizardProgressBarDivId').setStyle('display', 
-                                                                    'block');
-              Y.one("#initializeClusterCoreDivId").setStyle('display', 'block');
-              alert("HIDING!");
-              errorInformationPanel.hide();
-              },
-              section: 'footer'
-            };
-
-            var goToServicesSelectPageButton = {
-              value: 'I dont mind the wild ones!',
-              action: function (e) {
-              e.preventDefault();
-              Y.one('#installationWizardProgressBarDivId').setStyle('display', 'block');
-              Y.one('#displayProgressStatusDivId').setStyle('display', 'none');
-              transitionToNextStage( "#displayProgressCoreDivId", discoverProgressInfo, "#selectServicesCoreDivId", discoverProgressInfo, renderSelectServicesBlock);
-                alert("HIDING!");
-                errorInformationPanel.hide();
-                errorInformationPanel = null;
-              },
-              section: 'footer'
-            };
-
-            errorInformationPanel.addButton( backToInstallationWizardButton );
-            errorInformationPanel.addButton( goToServicesSelectPageButton );
-
-            Y.one("#errorInfoLinkId").on( "click", function(err) {
-            
-                Y.log("ERROR LINK RENDER: " + Y.Lang.dump(e.response.meta.stateInfo));
-                errorInformationPanel.set( 'bodyContent', Y.Lang.dump( e.response.meta.stateInfo ) );
-                alert("SHOWING! " + Y.Lang.dump(errorInformationPanel));
-                errorInformationPanel.show();
-            });
-          } else {
-            Y.one("#successInfoLinkId").on( "click", function(e) {
-              Y.one('#installationWizardProgressBarDivId').setStyle('display', 'block');
-              Y.one('#displayProgressStatusDivId').setStyle('display', 'none');
-              transitionToNextStage( "#displayProgressCoreDivId", discoverProgressInfo, "#selectServicesCoreDivId", discoverProgressInfo, renderSelectServicesBlock);
-          });
-        }
-        }
-
-        discoverProgressMarkup += '</ul>';
-
-//        Y.log('About to generate markup: ' + discoverProgressMarkup);
-        Y.one('#displayProgressDynamicRenderDivId').setContent( discoverProgressMarkup );
-      },
-      failure: function (e) {
-        alert('Failed to fetch more progress!');
-        /* No point making any more attempts. */
-        discoverProgressDataSource.clearInterval( discoverProgressPollHandle );
-      }
-    }
-  });
-} 

+ 0 - 61
hmc/js/deploy_backup.js

@@ -1,61 +0,0 @@
-function generateServiceMasterOptions (Y, masterHost, allHosts) {
-
-  var generatedOptions = "<option>" + masterHost + "</option>";
-
-  /* The dropdown hosts are allHosts minus masterHost. */
-  Y.Array.each( allHosts, function(host) {
-
-      if( host != masterHost ) {
-        generatedOptions += "<option>" + host + "</option>";
-      }
-    });
-
-  return generatedOptions;
-}
-
-function renderDeploy (Y, deployInfo) {
-
-  Y.one('#deploySubmitButtonId').on('click',function (e) {
-
-      e.target.set('disabled', true);
-
-      var deployRequestData = {};
-
-      Y.io("../php/deploy.php?clusterName="+deployInfo.clusterName, {
-
-          method: 'POST',
-          data: Y.JSON.stringify(deployRequestData),
-          timeout : 10000,
-          on: {
-            success: function (x,o) {
-                  e.target.set('disabled', false);
-                  Y.log("RAW JSON DATA: " + o.responseText);
-
-                  // Process the JSON data returned from the server
-                  try {
-                    xxxJson = Y.JSON.parse(o.responseText);
-                  }
-                  catch (e) {
-                    alert("JSON Parse failed!");
-                    return;
-                  }
-
-                  Y.log("PARSED DATA: " + Y.Lang.dump(xxxJson));
-
-//                  /* Done with this stage, hide it. */
-//                  Y.one("#deployCoreDivId").setStyle('display','none');
-//
-//                  /* Render the next stage. */
-//                  renderConfigureCluster(Y, xxxJson);
-//
-//                  /* Show off our rendering. */
-//                  Y.one("#configureClusterCoreDivId").setStyle('display','block');
-            },
-            failure: function (x,o) {
-                  e.target.set('disabled', false);
-              alert("Async call failed!");
-            }
-          }
-      });
-  });
-}

+ 0 - 100
hmc/js/displayLogs.js

@@ -1,100 +0,0 @@
-function getGsInstallLogs(Y, clusterName) {
-  var errorCount = 0;
-  var lastSize = 0;
-  var sizeRepeatedCount = 0;
-
-  YUI().use("node", "io", "dump", "json", "datasource", "datasource-io", "datasource-jsonschema", "datasource-polling", function(Y) {
-
-/*
-     var getLogFunction = function() {
-       Y.io("../php/displayLogs.php?clusterName=" + clusterName + "&lines=all", {
-        method: 'GET',
-        timeout : 1000,
-        on: {
-            success: function (x,o)   {
-                Y.log("RAW LOG DATA: " + o.responseText);
-                return o.responseText;
-            },
-            failure: function (x,o) {
-               alert("Async call failed!");
-            }
-        }
-    });
-
-   };
-*/
-
-   var id;
-//   var myDataSource = new Y.DataSource.Function({source:getLogFunction});
-   var myDataSource = new Y.DataSource.IO({source:"../php/displayLogs.php?clusterName=" + clusterName + "&lines=all"});
-   myDataSource.plug(Y.Plugin.DataSourceJSONSchema, {
-        schema: {
-            metaFields: {logs:"logs", clusterName:"clusterName", gsInstallDone:"gsInstallDone"}
-        }
-    });
-   var callback = {
-            success: function(e){
-               var logs = e.response.meta.logs;
-               Y.log("IN LOG CALLBACK: got logs of length: " + logs.length);
-               errorCount=0;
-               var length = logs.length;
-               var newlogs;
-               if (length > lastSize ) {
-                 newlogs = logs.split('\n').join('<br/>');
-               }
-/*
-               if (length == lastSize) {
-                  ++sizeRepeatedCount;
-               } else {
-                  sizeRepeatedCount = 0;
-                  lastSize = length;
-               }
-               if (sizeRepeatedCount == 5 ) {
-                  Y.log("In log callback: stopping, repeat count=" + sizeRepeatedCount);
-                  myDataSource.clearInterval(id); // end polling
-               }
-*/
-               Y.log("IN LOG CALLBACK: got installdone as " + e.response.meta.gsInstallDone);
-               if (e.response.meta.gsInstallDone) {
-                  Y.log("In log callback: stopping, got installdone as " + e.response.meta.gsInstallDone);
-                  myDataSource.clearInterval(id); // end polling
-                  newlogs += 'Installation script finished...<br/>';
-      //            Y.one("#installDoneDivId").setStyle('display', 'block');
-               } else {
-                  newlogs += '<img src="../images/loading.gif"/><br/>';
-               }
-               Y.one("#displayLogsContentDivId").setContent(newlogs);
-               Y.one("#displayLogsContentDivId").scrollTop = Y.one("#displayLogsContentDivId").scrollHeight;
-            },
-            failure: function(e){
-               ++errorCount;
-               Y.log("In log callback: failed, error count=" + errorCount);
-               if (errorCount > 3 ){
-                  myDataSource.clearInterval(id); // end polling 
-               }
-            }
-        };
-    id = myDataSource.setInterval(5000, {'request': {},'callback':callback}); // Starts polling
-    });
-}
-
-
-function renderDisplayLogs(Y, clusterName) {
-  /*
-  Y.one('#installDoneDivId').on('click',function (e) {
-
-      e.target.set('disabled', true);
-  */
-
-      /* Done with this stage, hide it. */
-    //  Y.one("#displayLogsCoreDivId").setStyle('display','none');
-
-      /* Render the next stage. */
-    //  getServicesStatus(Y, clusterName);
-
-     // /* Show off our rendering. */
-     // Y.one("#displayServiceStatusCoreDivId").setStyle('display','block');
-     // });
-
-  getGsInstallLogs(Y, clusterName);
-}

+ 0 - 119
hmc/js/initializeCluster_old.js

@@ -1,119 +0,0 @@
-// Create business logic in a YUI sandbox using the 'io' and 'json' modules
-function renderInitializeClusterBlockABC(Y, infoInitializeCluster) {
-
-    var clusterName = infoInitializeCluster.clusterName;
-
-    // REZ XXX Remove.
-    //setNavigationContent(Y, "Clusters > New cluster");
-
-    // REZ XXX Remove.
-    //activateStage(Y, "#selectServicesSideBarId");
-
-    var initializeClusterSubmitButton = Y.one('#initializeClusterSubmitButtonId');
-
-    initializeClusterSubmitButton.on('click',function (e) {
-
-        initializeClusterSubmitButton.set('disabled', true);
-
-        var initializeClusterFilesForm = Y.one("#initializeClusterFilesFormId");
-        
-        initializeClusterFilesForm.set('action', '../php/frontend/uploadFiles.php?clusterName=' + clusterName);
-
-        /* Set the target of the first form's upload to be a hidden iframe 
-         * on the page so as not to redirect to the PHP page we're POSTing 
-         * to.
-         *
-         * See http://www.openjs.com/articles/ajax/ajax_file_upload/ for 
-         * more on this.
-         */
-        initializeClusterFilesForm.set('target', 'fileUploadTarget');
-
-        /* And then programmatically submit the first of the 2 forms. */ 
-        initializeClusterFilesForm.submit();
-
-        /* The 2nd form will be sequentially submitted after the first one is 
-         * done (which we are notified of by listening for the 'load' event on 
-         * #fileUploadTargetId). 
-         */
-    });
-
-    /* Only once the #fileUploadTargetId is done loading do we know that the
-     * first form upload is done, so use this as a trigger to fire off the
-     * 2nd upload; we need to be sequential to avoid race conditions at the
-     * back-end.
-     */
-    Y.one("#fileUploadTargetId").on('load', function (e1) {
-
-      var initializeClusterRequestData = {
-        "ClusterDeployUser" : Y.one("#clusterDeployUserId").get('value'),
-        "services" : [
-               { "serviceName" : "HDFS", "isEnabled" : Y.one("#installHDFSId").get('checked') },
-               { "serviceName" : "MAPREDUCE", "isEnabled" : Y.one("#installMRId").get('checked') },
-               { "serviceName" : "HBASE", "isEnabled" : Y.one("#installHBaseId").get('checked') },
-               { "serviceName" : "HCATALOG", "isEnabled" : Y.one("#installHCatalogId").get('checked') },
-               { "serviceName" : "TEMPLETON", "isEnabled" : Y.one("#installTempletonId").get('checked') },
-               { "serviceName" : "OOZIE", "isEnabled" : Y.one("#installOozieId").get('checked') },
-               { "serviceName" : "PIG", "isEnabled" : Y.one("#installPigId").get('checked') },
-               { "serviceName" : "SQOOP", "isEnabled" : Y.one("#installSqoopId").get('checked') }
-        ]
-      };
-      
-      Y.io("../php/frontend/initializeCluster.php?clusterName=" + clusterName, {
-
-          method: 'POST',
-          data: Y.JSON.stringify(initializeClusterRequestData),
-          timeout : 10000,
-          on: {
-            start: function(x, o) {
-              Y.log("In start function");
-              // waitPanel.set('headerContent' ,'Loading, please wait...');
-              // waitPanel.set('bodyContent', 'Discovering nodes, doing complicated things which are too hard to explain so please wait ... ( we may get back to you someday)'); 
-              // waitPanel.render(document.body); 
-              // waitPanel.set('display', 'block'); 
-              // Y.one("#initializeClusterStatusDivId").setStyle('background-color','red');
-              // Y.one("#initializeClusterStatusDivId").setStyle('font-color','white');
-              // Y.one("#initializeClusterStatusDivId").setStyle('border','1px solid');
-              showLoadingImg(Y);
-              //waitPanel.show();
-              // Y.one("#initializeClusterStatusDivId").setStyle('visible','true');
-            },
-            complete: function(x, o) {
-              initializeClusterSubmitButton.set('disabled', false);
-              Y.log("In stop function");
-              hideLoadingImg(Y);
-              //waitPanel.hide();
-            },
-            success: function (x,o) {
-              initializeClusterSubmitButton.set('disabled', false);
-              Y.log("RAW JSON DATA: " + o.responseText);
-
-              // Process the JSON data returned from the server
-              try {
-                clusterInfoJson = Y.JSON.parse(o.responseText);
-              }
-              catch (e) {
-                alert("JSON Parse failed!");
-                return;
-              }
-
-              Y.log("PARSED DATA: " + Y.Lang.dump(clusterInfoJson));
-
-              if (clusterInfoJson.result != 0) {
-                 // Error!
-                 alert("Got error!" + clusterInfoJson.error); 
-                 return;
-               }
-              clusterInfoJson = clusterInfoJson.response;
-
-              /* Done with this stage, transition to the next. */
-              transitionToNextStage( "#initializeClusterCoreDivId", initializeClusterRequestData,
-                  "#assignHostsCoreDivId", clusterInfoJson, renderAssignHosts );
-            },
-            failure: function (x,o) {
-              initializeClusterSubmitButton.set('disabled', false);
-              alert("Async call failed!");
-            }
-          }
-      });
-    });
-}

+ 0 - 192
hmc/js/rezConfigureCluster_backup.js

@@ -1,192 +0,0 @@
-function generateEligibleMountPoints (Y) {
-
-    /* The list we're about to build up. */
-    var desiredMountPoints = [];
-
-    var selections = Y.all("#configureClusterMountPointsInputDivId input[type=checkbox]");
-
-    selections.each( function(selection) {
-
-      if( selection.get('checked') == true ) {
-        desiredMountPoints.push( selection.get('value') );
-      }
-    });
-
-    var customMountPointsString = Y.Lang.trim( Y.one("#customMountPointsId").get('value') );
-
-    if( customMountPointsString.length != 0 ) {
-
-      Y.log("custom string = " + customMountPointsString);
-
-      /* Merge the split version of customMountPointsString into our final list
-       * of mount points to send back to the server for committing...
-       */
-      desiredMountPoints.push.apply( desiredMountPoints, customMountPointsString.split(',') );
-      Y.log(customMountPointsString.split(',').length);
-      Y.log(desiredMountPoints.join(','));
-    }
-
-    /* ...But not before performing a de-dupe, just to be safe. */
-    return Y.Array.dedupe( desiredMountPoints );
-}
-
-function generateServiceDirs (Y, servicesInfo) {
-
-  var generatedServiceDirs = {};
-
-  var eligibleMountPoints = generateEligibleMountPoints(Y);
-
-  Y.Array.each( servicesInfo, function (serviceInfo) {
-
-      var serviceDirs = [];
-
-      for( currentDirNum = 0; currentDirNum < serviceInfo.maxDirectoriesNeeded; ++currentDirNum ) {
-
-        /* serviceInfo.maxDirectoriesNeeded that we get from the server is a cap 
-         * on how many directories need to be generated for that service - the
-         * user can always pick fewer than that, so guard against going out of
-         * bounds.
-         */
-        if( currentDirNum < eligibleMountPoints.length ) {
-
-          var currentDirName = eligibleMountPoints[currentDirNum];
-          
-          /* Add a trailing slash if it doesn't exist already. */
-          if( currentDirName.substr(-1) != '/' ) {
-            currentDirName += '/';
-          }
-
-          serviceDirs.push( currentDirName + serviceInfo.suffix );
-        }
-      }
-
-      var serviceDirValue = serviceDirs.join(',');
-
-      generatedServiceDirs[serviceInfo.keyName] = { 
-        'value' : serviceDirValue, 
-        'displayName' : serviceInfo.displayName 
-      };
-    });
-
-  return generatedServiceDirs;
-}
-
-function renderEffectiveClusterConfig (Y,generatedClusterConfig) {
-
-  var clusterConfigDisplayMarkup = "";
-
-  for (var configKey in generatedClusterConfig) {
-    if (generatedClusterConfig.hasOwnProperty( configKey )) {
-
-      var configElement = generatedClusterConfig[configKey];
-
-      var configElementName = configKey;
-      var configElementIdName = configElementName + 'Id';
-
-      /* Inefficient, with all the string concatenations, but clear to read. */
-      clusterConfigDisplayMarkup += 
-        '<p>' + 
-          '<label for=' + configElementIdName + '>' + configElement.displayName + '</label>' +
-          '<input type=text name=' + configElementName + ' id=' + configElementIdName + ' readonly=readonly value=' + configElement.value + '>' + 
-          '<br/>' +
-        '</p>';
-    }
-  }
-
-  /* Link the newly-generated clusterConfigInputMarkup into the DOM (making 
-   * sure it comes before the existing #configureClusterSubmitButtonId), thus
-   * rendering it.
-   */
-  Y.one("#configureClusterMountPointsDisplayDivId").setContent( clusterConfigDisplayMarkup );
-}
-
-/* Modify the working version of generatedClusterConfig to make it fit for
- * sending to our backend.
- */  
-function polishClusterConfig (generatedClusterConfig) {
-
-  var polishedClusterConfig = {};
-
-  for (var configKey in generatedClusterConfig) {
-    if (generatedClusterConfig.hasOwnProperty( configKey )) {
-      polishedClusterConfig[ configKey ] = generatedClusterConfig[configKey].value;
-    }
-  }
-
-  return polishedClusterConfig;
-}
-
-function renderConfigureCluster (Y, clusterConfig) {
-
-  var servicesInfo = Y.Array( clusterConfig.servicesInfo );
-
-  Y.one('#configureClusterSubmitButtonId').on('click',function (e) {
-
-      /* For now, our cluster config consists solely of the generated service directories. */
-      var generatedClusterConfig = generateServiceDirs(Y, servicesInfo);
-
-      var configureClusterRequestData = { 
-          mountPoints : generateEligibleMountPoints(Y), 
-          clusterConfig : polishClusterConfig(generatedClusterConfig) 
-        };
-
-      Y.io("../php/configureCluster.php?clusterName="+clusterConfig.clusterName, {
-
-          method: 'POST',
-          data: Y.JSON.stringify(configureClusterRequestData),
-          timeout : 10000,
-          on: {
-            success: function (x,o) {
-                  Y.log("RAW JSON DATA: " + o.responseText);
-
-                  // Process the JSON data returned from the server
-                  try {
-                    deployInfoJson = Y.JSON.parse(o.responseText);
-                  }
-                  catch (e) {
-                    alert("JSON Parse failed!");
-                    return;
-                  }
-
-                  Y.log("PARSED DATA: " + Y.Lang.dump(deployInfoJson));
-
-                  /* Done with this stage, hide it. */
-                 // Y.one("#configureClusterCoreDivId").setStyle('display','none');
-
-                  /* Render the next stage. */
-                  //renderConfigureCluster(Y, clusterConfigJson);
-
-                  /* Show off our rendering. */
-                 // Y.one("#configureClusterCoreDivId").setStyle('display','block');
-            },
-            failure: function (x,o) {
-              alert("Async call failed!");
-            }
-          }
-      });
-  });
-
-  /* Generate the key form elements into clusterConfigInputMarkup. */
-  var mountPoints = Y.Array( clusterConfig.mountPoints.sort(Y.ArraySort.compare) );
-
-  var clusterConfigInputMarkup = "";
-
-  Y.Array.each(mountPoints, function(mountPoint) {
-
-      /* Inefficient, with all the string concatenations, but clear to read. */
-      clusterConfigInputMarkup += 
-        '<p>' + 
-          '<input type=checkbox name=mountPoints checked=true value=' + mountPoint + '>' +
-            mountPoint + 
-          '<br/>' +
-        '</p>';
-    });
-
-  /* Link the newly-generated clusterConfigInputMarkup into the DOM (making 
-   * sure it comes before the existing #configureClusterSubmitButtonId), thus
-   * rendering it.
-   */
-  Y.one("#configureClusterMountPointsInputDivId").prepend( clusterConfigInputMarkup );
-
-  renderEffectiveClusterConfig(Y, generateServiceDirs(Y, servicesInfo));
-}

+ 0 - 73
hmc/js/serviceStatus.js

@@ -1,73 +0,0 @@
-function getServicesStatus(clusterName) {
-  YUI().use("node", "dump", "io", "datatable", "json", "arraysort", "datasource", "datasource-io", "datasource-jsonschema", "datasource-polling", function (Y) {
-
-     // setNavigationContent(Y, "Clusters > Cluster - " + clusterName);
-
-     var id;
-     var errorCount = 0;
-     var myDataSource = new Y.DataSource.IO({source:"../php/frontend/servicesStatus.php?clusterName=" + clusterName });
-     myDataSource.plug(Y.Plugin.DataSourceJSONSchema, {
-        schema: {
-            metaFields: { serviceStatus: "serviceStatus" }
-        }
-     });
- 
-    Y.one("#displayServiceStatusContentDivId").setContent("Getting status of all services");
-
-     var callback = {
-            success: function (e) {
-                Y.log("RAW DATA: " + e.response.meta.serviceStatus);
-
-                serviceStatusInfo = e.response.meta.serviceStatus;
-
-                /* Render the obtained service status info */
-                renderServicesStatus(Y, clusterName, serviceStatusInfo);
-           },
-           failure: function (x,o) {
-               alert("Async call failed!");
-               ++errorCount;
-               Y.log("In serviceStatus callback: failed, error count=" + errorCount);
-               if (errorCount > 3 ){
-                  myDataSource.clearInterval(id); // end polling 
-               }
-           }
-       };
-    id = myDataSource.setInterval(5000, {'request': {},'callback':callback}); // Starts polling
-  });
-}
-
-function renderServicesStatus(Y, clusterName, servicesStatusInfo) {
-
-  var svcStatusMarkup = "<table>" +
-                           "<caption>Installed services</caption>" +
-                           "<thead><tr><th>Name</th><th>Description</th><th>Status</th><th>Management</th></tr></thead>";
-
-  for (var svcKey in servicesStatusInfo) {
-    if (servicesStatusInfo.hasOwnProperty( svcKey )) {
-
-      var statusNum = serviceStatusInfo[svcKey]["statusNum"];
-      if (statusNum == 4) {
-        // Separate tables for installed services
-        continue;
-      }
-
-      var status = serviceStatusInfo[svcKey]["status"];
-      if (statusNum == 5) {
-        status = status + '&nbsp;<img src="../images/loading.gif"/>';
-      }
-
-      /* Inefficient, with all the string concatenations, but clear to read. */
-      svcStatusMarkup +=
-        '<tr>' +
-          '<td>' + svcKey + '</td>' +
-          '<td> ' + serviceStatusInfo[svcKey]["description"] + ' </td>' +
-          '<td>' + status + '</td>' +
-          '<td> Management</td>' +
-        '</tr>';
-    }
-  } 
-  svcStatusMarkup += '</table>';
-
-  Y.one("#displayServiceStatusContentDivId").setContent( svcStatusMarkup );
-
-}

+ 0 - 175
hmc/php/frontend/servicesStatus.php

@@ -1,175 +0,0 @@
-<?php
-
-$clusterName = $_GET['clusterName'];
-// TODO: validate
-
-$clusterInfo = getPersistedClusterInfo($clusterName);
-$servicesInfo = $clusterInfo["services"];
-
-
-$SERVICE_CHECKS_INSTALLDIR="/var/lib/gsInstaller/service_checks/";
-$NN_SCRIPT="check_namenode_up.sh";
-$HBM_SCRIPT="check_hbasemaster_up.sh";
-$HCAT_SCRIPT="check_hcatserver_up.sh";
-$JT_SCRIPT="check_jobttracker_up.sh";
-$OOZIE_SCRIPT="check_oozieserver_up.sh";
-$TEMPLETON_SCRIPT="check_templeton_up.sh";
-$ZK_SCRIPT="check_zookeeper_cluster_up.sh";
-
-
-function convertStatusNumToString($num) {
-  $ret = "UNKNOWN ERROR";
-  switch ($num) {
-    case 0:
-      $ret = "RUNNING";
-      break;
-    case 1:
-      $ret = "RUNNING IN DEGRADED MODE";
-      break;
-    case 2:
-      $ret = "NOT RUNNING";
-      break;
-    case 3:
-      $ret = "UNKNOWN ERROR";
-      break;
-    case 4:
-      $ret = "NOT INSTALLED";
-      break;
-    case 5:
-      $ret = "INSTALLATION IN PROGRESS";
-      break;
-  }
-  return $ret;
-}
-
-// 0 ok - running
-// 1 warn
-// 2 crit
-// 3 unknown
-// 4 uninstalled
-// 5 install in progress
-function getSvcStatus($svc, $role, $script) {
-  global $servicesInfo;
-  global $clusterName;
-  if (!isset($servicesInfo[$svc]["enabled"])
-      || $servicesInfo[$svc]["enabled"] == false) {
-    return 4;
-  }
-
-  if (hasInstallStarted($clusterName) && !isGsInstallDone($clusterName)) {
-    return 5;
-  }
-
-  $host = $servicesInfo[$svc]["masters"][$role]["hostName"];
-
-  global $SERVICE_CHECKS_INSTALLDIR;
-  $script_path=$SERVICE_CHECKS_INSTALLDIR.$script;
-  if (!file_exists($script_path)) {
-    error_log("Could not find check script $script_path for $svc : $role");
-    return 3;
-  }
-  $cmd=$script_path." --host $host";
-  $retval = 3;
-  //system($cmd, $retval);
-
-  $handle = popen($cmd, "r");
-  // TODO error check
-  $output = "";
-  while (!feof($handle)) {
-    $read = fread($handle, 2096);
-    $output .= $read;
-  }
-  pclose($handle);
-
-  error_log("Ouput for $svc check: $output");
-
-  if ($output == "") {
-     $retval = 3;
-  } else if (strpos($output, "OK:") === 0) {
-     $retval = 0;
-  } else if (strpos($output, "WARNING:") === 0) {
-     $retval = 1;
-  } else if (strpos($output, "CRITICAL:") === 0) {
-     $retval = 2;
-  }
-
-  return $retval;
-}
-
-function getHdfsStatus() {
-  global $NN_SCRIPT;
-  return getSvcStatus("hdfs", "nameNode", $NN_SCRIPT);
-}
-
-function getMapRedStatus() {
-  global $JT_SCRIPT;
-  return getSvcStatus("mapReduce", "jobTracker", $JT_SCRIPT);
-}
-
-
-function getHBaseStatus() {
-  global $HBM_SCRIPT;
-  return getSvcStatus("hBase", "hBaseMaster", $HBM_SCRIPT);
-}
-
-function getHCatStatus() {
-  global $HCAT_SCRIPT;
-  return getSvcStatus("hCatalog", "hCatServer", $HCAT_SCRIPT);
-}
-
-
-/*
-function getZKStatus() {
-  global $ZK_SCRIPT;
-  return getSvcStatus("zooKeeper",
-}
-*/
-
-function getOozieStatus() {
-  global $OOZIE_SCRIPT;
-  return getSvcStatus("oozie", "oozieServer", $OOZIE_SCRIPT);
-}
-
-function getTempletonStatus() {
-  global $TEMPLETON_SCRIPT;
-  return getSvcStatus("templeton", "templetonNode", $TEMPLETON_SCRIPT);
-}
-
-$serviceStatus = array(
-    $servicesInfo["HDFS"]["displayName"] => array(
-                           "description" => "The Hadoop distributed file-system",
-                           "statusNum" => getHdfsStatus(),
-                        ),
-    $servicesInfo["MAPREDUCE"]["displayName"] => array(
-                           "description" => "The Hadoop MapReduce processing platform",
-                           "statusNum" => getMapRedStatus(),
-                        ),
-    $servicesInfo[$HBaseName]["displayName"] => array(
-                           "description" => "The Hadoop Database",
-                           "statusNum" => getHBaseStatus(),
-                        ),
-    $servicesInfo[$HCatName]["displayName"] => array(
-                           "description" => "The Hadoop Catalog",
-                           "statusNum" => getHcatStatus(),
-                        ),
-    $servicesInfo[$TempletonName]["displayName"] => array(
-                           "description" => "Hadoop web-services",
-                           "statusNum" => getTempletonStatus(),
-                        ),
-    $servicesInfo[$OozieName]["displayName"] => array(
-                           "description" => "Hadoop job-workflow system",
-                           "statusNum" => getOozieStatus(),
-                        ),
-  );
-
-foreach ($serviceStatus as $key=>$status) {
-  $serviceStatus[$key]["status"] = convertStatusNumToString($serviceStatus[$key]["statusNum"]);
-}
-
-$response = array();
-$response["serviceStatus"] = $serviceStatus;
-
-header("Content-type: application/json");
-print(json_encode($response));
-
-?>