You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vi...@apache.org on 2012/06/02 02:10:38 UTC
svn commit: r1345400 - in /incubator/ambari/branches/ambari-186: ./ hmc/css/
hmc/html/ hmc/js/ hmc/php/conf/ hmc/php/db/ hmc/php/puppet/
Author: vikram
Date: Sat Jun 2 00:10:37 2012
New Revision: 1345400
URL: http://svn.apache.org/viewvc?rev=1345400&view=rev
Log:
AMBARI-314. Uninstall Wizard prevents the user from proceeding (Contributed by Yusaku)
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/css/common.css
incubator/ambari/branches/ambari-186/hmc/html/clusters.php
incubator/ambari/branches/ambari-186/hmc/html/index.php
incubator/ambari/branches/ambari-186/hmc/html/manageServices.php
incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php
incubator/ambari/branches/ambari-186/hmc/js/addNodes.js
incubator/ambari/branches/ambari-186/hmc/js/selectComponents.js
incubator/ambari/branches/ambari-186/hmc/js/uninstall.js
incubator/ambari/branches/ambari-186/hmc/js/uninstallProgress.js
incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc
incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc
incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php
incubator/ambari/branches/ambari-186/hmc/php/puppet/DBReader.php
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Sat Jun 2 00:10:37 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-314. Uninstall Wizard prevents the user from proceeding (Yusaku via Vikram)
+
AMBARI-311. Update HBase configuration description (Suresh via Vikram)
AMBARI-313. Provide a DB cleanup script. Missed script (Hitesh via Vikram)
Modified: incubator/ambari/branches/ambari-186/hmc/css/common.css
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/css/common.css?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/css/common.css (original)
+++ incubator/ambari/branches/ambari-186/hmc/css/common.css Sat Jun 2 00:10:37 2012
@@ -395,4 +395,11 @@ a.btn {
#yumMirrorSupportFormFieldsId input[type=text] {
width:500px;
margin-bottom:20px;
+}
+
+div.separator {
+ margin-bottom:20px;
+}
+#selectServicesCoreDivId ul {
+ list-style:none outside none;
}
\ No newline at end of file
Modified: incubator/ambari/branches/ambari-186/hmc/html/clusters.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/clusters.php?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/clusters.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/clusters.php Sat Jun 2 00:10:37 2012
@@ -1,6 +1,7 @@
+<?php require_once "./head.inc" ?>
<html>
<head>
- <title id="pageTitleId">Hortonworks Data Platform Portal</title>
+ <title id="pageTitleId"><?php echo $RES['page.title'] ?></title>
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="../yui-3.5.1/build/cssreset/cssreset-min.css">
Modified: incubator/ambari/branches/ambari-186/hmc/html/index.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/index.php?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/index.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/index.php Sat Jun 2 00:10:37 2012
@@ -1,12 +1,14 @@
+<?php require_once "./head.inc" ?>
<html>
<head>
- <title id="pageTitleId">Hortonworks Management Center</title>
+ <title id="pageTitleId"><?php echo $RES['page.title'] ?></title>
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="../css/bootstrap.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="../css/common3.css" media="screen"/>
+ <link rel="shortcut icon" href="../images/logo-micro.gif">
<!-- End CSS -->
</head>
Modified: incubator/ambari/branches/ambari-186/hmc/html/manageServices.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/manageServices.php?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/manageServices.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/manageServices.php Sat Jun 2 00:10:37 2012
@@ -1,6 +1,7 @@
+<?php require_once "./head.inc" ?>
<html>
<head>
- <title id="pageTitleId">Hortonworks Management Center</title>
+ <title id="pageTitleId"><?php echo $RES['page.title'] ?></title>
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="../yui-3.4.1/build/cssreset/cssreset-min.css">
@@ -9,6 +10,7 @@
<link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="../css/common3.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="../css/manageServices.css" media="screen"/>
+ <link rel="shortcut icon" href="../images/logo-micro.gif">
<!-- End CSS -->
</head>
Modified: incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/html/uninstallWizard.php Sat Jun 2 00:10:37 2012
@@ -1,6 +1,7 @@
+<?php require_once "./head.inc" ?>
<html>
<head>
- <title id="pageTitleId">Hortonworks Data Platform Portal</title>
+ <title id="pageTitleId"><?php echo $RES['page.title'] ?></title>
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="../yui-3.5.1/build/cssreset/cssreset-min.css">
@@ -20,92 +21,75 @@
// $clusterName = "m4v1";
// $clusterState = needWipeOut($clusterName);
?>
- <hr/>
-
- <div name="ContentDiv" id="ContentDivId">
-
- <!-- Installation Wizard -->
- <div name="installationWizardDiv" id="installationWizardDivId" style="display:block">
- <div name="installationWizardProgressBarDiv" id="installationWizardProgressBarDivId">
- <ol id="installationWizardProgressBarListId">
- <li id="addNodesStageId" class="installationWizardCurrentStage">
- <div>
- <span class="installationWizardStageNumber">
- 1
- </span>
- Wipe out cluster
- </div>
- </li>
- </ol>
- </div>
-
- <br/>
+
+ <div id="ContentDivId">
+ <!-- Uninstallation Wizard -->
+ <div id="installationWizardDivId" style="display:block">
<?php require "./utils.htmli"; ?>
-
- <div name="installationMainFormsDiv" id="installationMainFormsDivId">
-
- <br/>
+ <div class="pageSummary">
+ <h2><?php echo $RES['uninstallWizard.pageSummary.header'] ?></h2>
+ <p><?php echo $RES['uninstallWizard.pageSummary.body'] ?></p>
+ </div>
+ <div id="installationMainFormsDivId">
+ <div id="formStatusDivId" class="alert alert-error" style="display:none">
+ </div>
<div id="addNodesCoreDivId" style="display:block">
<fieldset>
<form id="addNodesFilesFormId" 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>
+ <label for="clusterDeployUserId"><?php echo $RES['common.sshUsername.label'] ?></label>
+ <input type="text" name="ClusterDeployUser" id="clusterDeployUserId" value="root" placeholder="">
+ <div class="separator"></div>
+ <label for="clusterDeployUserIdentityFileId"><?php echo $RES['common.sshPrivateKeyFile.label'] ?></label>
<input type="file" name="clusterDeployUserIdentityFile" id="clusterDeployUserIdentityFileId" value="" placeholder="">
- </p>
- <br/>
- <p>
- <div name="confirmWipeOutDiv" id="confirmWipeOutDivId">
- <label for="confirmWipeOutId">Confirm Wipeout(Data will be lost)</label>
- <input type="checkbox" id="confirmWipeOutCheckId" value="true">
+ <div class="separator"></div>
+ <div id="fileUploadWrapperDivId">
+ <iframe name="fileUploadTarget" id="fileUploadTargetId" src="about:blank" style="display:none"></iframe>
+ </div>
+ <div class="separator"></div>
+ <div id="confirmWipeOutDivId">
+ <label class="checkbox" for="confirmWipeOutId"><?php echo $RES['uninstallWizard.wipeout.label'] ?>
+ <input type="checkbox" id="confirmWipeOutCheckId" value="false">
+ </label>
</div>
+ <div class="separator"></div>
+ <input type="button" class="btn btn-large" id="addNodesSubmitButtonId" value="<?php echo $RES['uninstallWizard.submit.label'] ?>">
+ </fieldset>
+ </div>
- <div id="fileUploadWrapperDivId">
- <iframe name="fileUploadTarget" id="fileUploadTargetId" src="about:blank" style="display:none"></iframe>
- </div>
- <input type="button" id="addNodesSubmitButtonId" value="Confirm" class="submitButton">
- </p>
- </div>
+ <?php require "./txnUtils.htmli"; ?>
- <?php require "./txnUtils.htmli"; ?>
-
- </div>
- </div>
- <!-- End of installation Wizard -->
-
- <hr/>
- <?php require "./footer.htmli"; ?>
-
- <!-- Javascript Scaffolding -->
- <script type="text/javascript">
-
- var freshInstallation = false;
- var nodesAction = "uninstall";
- var clusterName = "<?php echo $_GET['clusterName']; ?>";
-
- var InstallationWizard = {
-
- AddNodes:
- {},
- AddNodesProgress:
- {}
- };
-
- var jsFilesToLoad = [
- '../js/utils.js',
- '../js/txnUtils.js',
- '../js/uninstall.js',
- '../js/uninstallProgress.js',
- ];
- </script>
+ </div>
+ </div>
+ <!-- End of Uninstallation Wizard -->
+ </div>
+ <?php require "./footer.htmli"; ?>
+
+ <!-- Javascript Scaffolding -->
+ <script type="text/javascript">
+
+ var freshInstallation = false;
+ var nodesAction = "uninstall";
+ var clusterName = "<?php echo $_GET['clusterName']; ?>";
+
+ var InstallationWizard = {
+
+ AddNodes:
+ {},
+ AddNodesProgress:
+ {}
+ };
+
+ var jsFilesToLoad = [
+ '../js/utils.js',
+ '../js/txnUtils.js',
+ '../js/uninstall.js',
+ '../js/uninstallProgress.js',
+ ];
+ </script>
- <?php require "./bootstrapJs.htmli"; ?>
- <!-- End of Javascript Scaffolding -->
+ <?php require "./bootstrapJs.htmli"; ?>
+ <!-- End of Javascript Scaffolding -->
- </body>
- </html>
+ </body>
+</html>
Modified: incubator/ambari/branches/ambari-186/hmc/js/addNodes.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/addNodes.js?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/addNodes.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/addNodes.js Sat Jun 2 00:10:37 2012
@@ -60,7 +60,7 @@ globalYui.one('#addNodesSubmitButtonId')
focusId = '#clusterDeployUserIdentityFileId';
}
if (message != '') {
- message += ',';
+ message += '. ';
}
message += 'SSH Private Key File not specified';
globalYui.one("#clusterDeployUserIdentityFileId").addClass('formInputError');
@@ -75,9 +75,9 @@ globalYui.one('#addNodesSubmitButtonId')
focusId = '#clusterHostsFileId';
}
if (message != '') {
- message += ',';
+ message += '. ';
}
- message += 'Hosts file not specified';
+ message += 'Hosts File not specified';
globalYui.one("#clusterHostsFileId").addClass('formInputError');
} else {
globalYui.one("#clusterHostsFileId").removeClass('formInputError');
@@ -102,7 +102,7 @@ globalYui.one('#addNodesSubmitButtonId')
focusId = '#yumRepoFilePathId';
}
if (message != '') {
- message += ',';
+ message += '. ';
}
message += 'Yum Repo file not specified';
globalYui.one("#yumRepoFilePathId").addClass('formInputError');
@@ -114,7 +114,7 @@ globalYui.one('#addNodesSubmitButtonId')
focusId = '#hmcArtifactsDownloadUrlId';
}
if (message != '') {
- message += ',';
+ message += '. ';
}
message += 'HDP Artifacts Download URL not specified';
globalYui.one("#hmcArtifactsDownloadUrlId").addClass('formInputError');
@@ -126,7 +126,7 @@ globalYui.one('#addNodesSubmitButtonId')
focusId = '#hmcGplArtifactsDownloadUrlId';
}
if (message != '') {
- message += ',';
+ message += '. ';
}
message += 'GPL Artifacts Download URL not specified';
globalYui.one("#hmcGplArtifactsDownloadUrlId").addClass('formInputError');
Modified: incubator/ambari/branches/ambari-186/hmc/js/selectComponents.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/selectComponents.js?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/selectComponents.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/selectComponents.js Sat Jun 2 00:10:37 2012
@@ -47,8 +47,9 @@ function getServiceComponentListAndRende
if (!component[componentName]['isMaster'] &&
!component[componentName]['isClient']) {
divContent += '<li class="selectServicesEntry" name=try>';
- divContent += '<label for="install' + serviceName + 'Id">' + component[componentName]['displayName'] + '</label>'
+ divContent += '<label class="checkbox" for="install' + serviceName + 'Id">'
+ '<input type="checkbox" disabled="disabled" checked="yes" name="' + serviceName + '" id="install' + serviceName + 'Id" value="' + component[componentName]["componentName"] + '"/>'
+ + component[componentName]['displayName'] + '</label>'
+ '<div class="contextualhelp">' + component[componentName]['description'] + '</div>'
+ '</li>';
} else {
Modified: incubator/ambari/branches/ambari-186/hmc/js/uninstall.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/uninstall.js?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/uninstall.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/uninstall.js Sat Jun 2 00:10:37 2012
@@ -24,7 +24,7 @@ globalYui.one('#addNodesSubmitButtonId')
if (userId == '') {
errCount++;
focusId = '#clusterDeployUserId';
- message += 'Cluster Deploy User cannot be empty';
+ message += 'SSH Username cannot be empty';
globalYui.one("#clusterDeployUserId").addClass('formInputError');
} else {
globalYui.one("#clusterDeployUserId").removeClass('formInputError');
@@ -39,7 +39,7 @@ globalYui.one('#addNodesSubmitButtonId')
if (message != '') {
message += ',';
}
- message += 'User Identity file not specified';
+ message += 'SSH Private Key File not specified';
globalYui.one("#clusterDeployUserIdentityFileId").addClass('formInputError');
} else {
globalYui.one("#clusterDeployUserIdentityFileId").removeClass('formInputError');
@@ -55,7 +55,7 @@ globalYui.one('#addNodesSubmitButtonId')
if (message != '') {
message += ',';
}
- message += 'Hosts file not specified';
+ message += 'Hosts File not specified';
globalYui.one("#clusterHostsFileId").addClass('formInputError');
} else {
globalYui.one("#clusterHostsFileId").removeClass('formInputError');
@@ -69,6 +69,12 @@ globalYui.one('#addNodesSubmitButtonId')
}
clearFormStatus();
+
+ var doWipeout = globalYui.one('#confirmWipeOutCheckId').get('checked');
+ var warningMessage = doWipeout ? "All your data, in addition to services, will be deleted from all your cluster nodes. Are you sure you want to proceed?" : "All your services will be deleted from all your cluster nodes. Your data will not be deleted. Are you sure you want to proceed?";
+ if (!confirm(warningMessage)) {
+ return;
+ }
showLoadingImg();
Modified: incubator/ambari/branches/ambari-186/hmc/js/uninstallProgress.js
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/js/uninstallProgress.js?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/uninstallProgress.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/uninstallProgress.js Sat Jun 2 00:10:37 2012
@@ -64,12 +64,6 @@ function renderUninstallProgress (uninst
hideLoadingImg();
- /* At this point, our users are done with the installation wizard
- * and have asked for a uninstall, so there's no going back - remove
- * all traces of #installationWizardProgressBarDivId.
- */
- globalYui.one('#installationWizardProgressBarDivId').setStyle('display', 'none');
-
var hmcRestartMsg = '';
if (uninstallProgressInfo.nagiosGangliaCoHosted != null
&& uninstallProgressInfo.nagiosGangliaCoHosted) {
Modified: incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/conf/Config.inc Sat Jun 2 00:10:37 2012
@@ -12,7 +12,7 @@ $GLOBALS["puppetMaxParallelKicks"] = 10;
$GLOBALS["puppetManifestDir"] = "/etc/puppet/master/manifests/";
$GLOBALS["puppetKickVersionFile"] = "/var/lib/puppet/puppet_kick_version.txt";
$GLOBALS["puppetReportsDir"] = "/var/lib/puppet/reports";
-$GLOBALS["puppetKickTimeout"] = 300;
+$GLOBALS["puppetKickTimeout"] = 60;
$GLOBALS["puppetModulesDirectory"] = "/etc/puppet/master/modules";
$GLOBALS["puppet_install"] = "/usr/share/hmc/ShellScripts/puppet_agent_install.sh";
$GLOBALS["DRYRUN"] = FALSE;
Modified: incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/conf/MessageResources-en.inc Sat Jun 2 00:10:37 2012
@@ -43,7 +43,8 @@ $RES['addNodesWizard.selectServices.page
$RES['addNodesWizard.selectServices.pageSummary.body']="Some services are installed by default.";
$RES['addNodesWizard.selectServices.submit.label']="Deploy";
$RES['uninstallWizard.pageSummary.header']="Uninstall Cluster";
-$RES['uninstallWizard.pageSummary.body']="<span class='label label-important'>Warning</span> This will delete all services and data on all of your nodes in the cluster.";
-$RES['uninstallWizard.submit.label']="Uninstall services and data from all nodes";
+$RES['uninstallWizard.pageSummary.body']="<span class='label label-important'>Warning</span> Proceed with caution! This will delete all services from all of your nodes in the cluster (and all of your data, if you choose the <i>wipe out</i> option).";
+$RES['uninstallWizard.wipeout.label']="Perform wipe out (delete all data)";
+$RES['uninstallWizard.submit.label']="Uninstall Cluster";
?>
\ No newline at end of file
Modified: incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/db/HMCDBAccessor.php Sat Jun 2 00:10:37 2012
@@ -104,7 +104,7 @@ class HMCDBAccessor {
LockRelease(); return $response;
}
$result = $pdoStmt->fetchAll(PDO::FETCH_BOTH);
-
+
LockRelease();
if (isset($result) && is_array($result) && count($result) == 1) {
Modified: incubator/ambari/branches/ambari-186/hmc/php/puppet/DBReader.php
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/hmc/php/puppet/DBReader.php?rev=1345400&r1=1345399&r2=1345400&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/php/puppet/DBReader.php (original)
+++ incubator/ambari/branches/ambari-186/hmc/php/puppet/DBReader.php Sat Jun 2 00:10:37 2012
@@ -46,7 +46,7 @@ class DBReader {
}
foreach($componentInfo["hosts"] as $hostname => $hostInfo) {
if (!isset($this->hostKeyMap[$componentName])) {
- $this->logger->log_debug("No puppet handling needed for component "
+ $this->logger->log_trace("No puppet handling needed for component "
. $componentName);
continue;
}
@@ -80,7 +80,7 @@ class DBReader {
$hostRoles[$hostname] = array();
}
if (!isset($this->componentToPuppetClassMap[$componentName])) {
- $this->logger->log_debug("No puppet handling needed for component "
+ $this->logger->log_trace("No puppet handling needed for component "
. $componentName);
continue;
}