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/07 02:45:09 UTC
svn commit: r1347227 - in /incubator/ambari/branches/ambari-186: CHANGES.txt
hmc/js/uninstall.js
Author: vikram
Date: Thu Jun 7 00:45:08 2012
New Revision: 1347227
URL: http://svn.apache.org/viewvc?rev=1347227&view=rev
Log:
AMBARI-423. Uninstall cluster can't be automated by Selenium due to the internal confirmation window (Contributed by Yusaku)
Modified:
incubator/ambari/branches/ambari-186/CHANGES.txt
incubator/ambari/branches/ambari-186/hmc/js/uninstall.js
Modified: incubator/ambari/branches/ambari-186/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/ambari-186/CHANGES.txt?rev=1347227&r1=1347226&r2=1347227&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/CHANGES.txt (original)
+++ incubator/ambari/branches/ambari-186/CHANGES.txt Thu Jun 7 00:45:08 2012
@@ -6,6 +6,8 @@ characters wide.
Release 0.1.x - unreleased
+ AMBARI-423. Uninstall cluster can't be automated by Selenium due to the internal confirmation window (Yusaku via Vikram)
+
AMBARI-422. Increase Threshold For Number Of Successive Backend Connection Failures (Varun via Vikram)
AMBARI-420. Improve style on error log popups. Added missing file (Mahadev via Vikram)
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=1347227&r1=1347226&r2=1347227&view=diff
==============================================================================
--- incubator/ambari/branches/ambari-186/hmc/js/uninstall.js (original)
+++ incubator/ambari/branches/ambari-186/hmc/js/uninstall.js Thu Jun 7 00:45:08 2012
@@ -72,34 +72,55 @@ globalYui.one('#addNodesSubmitButtonId')
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();
-
- globalYui.log("About to upload files.");
- e.target.set('disabled', true);
-
- var addNodesFilesForm = globalYui.one("#addNodesFilesFormId");
-
- addNodesFilesForm.set('action', '../php/frontend/addNodes.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.
- */
- addNodesFilesForm.set('target', 'fileUploadTarget');
-
- /* And then programmatically submit the first of the 2 forms. */
- addNodesFilesForm.submit();
- globalYui.log("Files submitted to server.");
+
+ var confirmPanel = createInformationalPanel('#informationalPanelContainerDivId','Uninstall Cluster');
+ confirmPanel.set('centered', true);
+ confirmPanel.set('bodyContent', warningMessage);
+ confirmPanel.addButton({
+ value: 'Cancel',
+ action: function (e) {
+ e.preventDefault();
+ destroyInformationalPanel(confirmPanel);
+ },
+ classNames: '',
+ section: 'footer'
+ });
+ confirmPanel.addButton({
+ value: 'Proceed with Uninstall',
+ action: function (e) {
+ e.preventDefault();
+ destroyInformationalPanel(confirmPanel);
+ showLoadingImg();
+
+ globalYui.log("About to upload files.");
+ e.target.set('disabled', true);
+
+ var addNodesFilesForm = globalYui.one("#addNodesFilesFormId");
+
+ addNodesFilesForm.set('action', '../php/frontend/addNodes.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.
+ */
+ addNodesFilesForm.set('target', 'fileUploadTarget');
+
+ /* And then programmatically submit the first of the 2 forms. */
+ addNodesFilesForm.submit();
+ globalYui.log("Files submitted to server.");
+
+ e.target.set('disabled', false);
+ },
+ classNames: 'okButton',
+ section: 'footer'
+ });
- e.target.set('disabled', false);
+ confirmPanel.show();
+
});
var setupNodesJson = "";