You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2016/02/06 00:52:26 UTC

ambari git commit: AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki)

Repository: ambari
Updated Branches:
  refs/heads/trunk 31309e28b -> 60adfbcf8


AMBARI-14909: Add a clean data dir confirmation pop-up to HAWQ add slave wizard (nalex via jaoki)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/60adfbcf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/60adfbcf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/60adfbcf

Branch: refs/heads/trunk
Commit: 60adfbcf8f88ec4429a5fd444491af39ff9173fe
Parents: 31309e2
Author: Jun Aoki <ja...@apache.org>
Authored: Fri Feb 5 15:52:18 2016 -0800
Committer: Jun Aoki <ja...@apache.org>
Committed: Fri Feb 5 15:52:18 2016 -0800

----------------------------------------------------------------------
 .../hawq/addStandby/step3_controller.js         | 23 ++++++++++++++++----
 ambari-web/app/messages.js                      |  2 ++
 2 files changed, 21 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/60adfbcf/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js
index 0cb256d..513a519 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/hawq/addStandby/step3_controller.js
@@ -33,6 +33,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({
 
   selectedService: null,
 
+  hawqProps: null,
+
   hideDependenciesInfoBar: true,
 
   versionLoaded: true,
@@ -107,7 +109,8 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({
     this.setDynamicConfigValues(params, data);
     this.setProperties({
       selectedService: params,
-      isLoaded: true
+      isLoaded: true,
+      hawqProps: data
     });
   },
 
@@ -134,11 +137,23 @@ App.AddHawqStandbyWizardStep3Controller = Em.Controller.extend({
     }, this);
   },
 
+
   submit: function () {
     if (!this.get('isSubmitDisabled')) {
-      App.get('router.mainAdminKerberosController').getKDCSessionState(function() {
-        App.router.send("next");
-      });
+      dataDir = this.get('hawqProps').items[0].properties['hawq_master_directory'];
+      hawqStandby = this.get('hawqProps').items[0].properties['hawq_standby_address_host']
+      App.showConfirmationPopup(
+        function() {
+          App.get('router.mainAdminKerberosController').getKDCSessionState(function() {
+            App.router.send("next");
+          });
+        },
+        Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.body').format(dataDir, hawqStandby),
+        null,
+        Em.I18n.t('admin.addHawqStandby.wizard.step3.confirm.dataDir.title'),
+        "Confirm",
+        false
+      );
     }
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/60adfbcf/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 9be6d86..b14f9f7 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -2910,6 +2910,8 @@ Em.I18n.translations = {
       '</div>',
   'admin.addHawqStandby.wizard.step3.hawqMaster': 'Current HAWQ Master',
   'admin.addHawqStandby.wizard.step3.newHawqStandby': 'New HAWQ Standby Master',
+  'admin.addHawqStandby.wizard.step3.confirm.dataDir.title': 'HAWQ Standby Master Directory Confirmation',
+  'admin.addHawqStandby.wizard.step3.confirm.dataDir.body': 'Please confirm that the HAWQ data directory <b>{0}</b> on the Standby Master <b>{1}</b> does not exist or is empty.</br>If there is pre-existing data then HAWQ Standby will get initialized with stale data.',
   'admin.addHawqStandby.step4.save.configuration.note': 'This configuration is created by Add HAWQ Standby wizard',
   'admin.addHawqStandby.wizard.step4.header': 'Configure Components',
   'admin.addHawqStandby.wizard.step4.task0.title': 'Stop HAWQ Service',