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 2014/05/30 01:10:33 UTC
[2/2] git commit: AMBARI-5951. Installer does not proceed beyond
Customize Services if Hive is not selected. (yusaku via jaimin)
AMBARI-5951. Installer does not proceed beyond Customize Services if Hive is not selected. (yusaku via jaimin)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6962851f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6962851f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6962851f
Branch: refs/heads/trunk
Commit: 6962851fdd62095383c1cfda0eb61b0518f3013d
Parents: fb77bc4
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Thu May 29 16:10:05 2014 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Thu May 29 16:10:05 2014 -0700
----------------------------------------------------------------------
.../app/controllers/wizard/step7_controller.js | 94 ++++++++++++--------
1 file changed, 58 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/6962851f/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index b07ca74..b6b675a 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -970,47 +970,69 @@ App.WizardStep7Controller = Em.Controller.extend({
},
/**
+ * Check if new MySql database was chosen for Hive service
+ * and it is not located on the same host as Ambari server
+ * that using MySql database too.
+ *
+ * @method resolveHiveMysqlDatabase
+ **/
+ resolveHiveMysqlDatabase: function() {
+ var hiveService = this.get('content.services').findProperty('serviceName', 'HIVE');
+ if (!hiveService || !hiveService.get('isSelected') || hiveService.get('isInstalled')) {
+ this.moveNext();
+ }
+ var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value;
+ if (hiveDBType == 'New MySQL Database') {
+ var self= this;
+ this.checkMySQLHost().done(function () {
+ if (self.get('mySQLServerConflict')) {
+ // error popup before you can proceed
+ return App.ModalPopup.show({
+ header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
+ bodyClass: Ember.View.extend({
+ template: Ember.Handlebars.compile(Em.I18n.t('installer.step7.popup.mySQLWarning.body'))
+ }),
+ secondary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.gotostep5'),
+ primary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.dismiss'),
+ onSecondary: function (){
+ var parent = this;
+ return App.ModalPopup.show({
+ header: Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.header'),
+ bodyClass: Ember.View.extend({
+ template: Ember.Handlebars.compile( Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.body'))
+ }),
+ onPrimary: function (){
+ this.hide();
+ parent.hide();
+ // go back to step 5: assign masters and disable default navigation warning
+ App.router.get('installerController').gotoStep(5, true);
+ }
+ });
+ }
+ });
+ } else {
+ self.moveNext();
+ }
+ });
+ } else {
+ this.moveNext();
+ }
+ },
+
+ /**
+ * Proceed to the next step
+ **/
+ moveNext: function() {
+ App.router.send('next');
+ },
+
+ /**
* Click-handler on Next button
* @method submit
*/
submit: function () {
if (!this.get('isSubmitDisabled')) {
- var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value;
- if (hiveDBType == 'New MySQL Database') {
- var self= this;
- this.checkMySQLHost().done(function () {
- if (self.get('mySQLServerConflict')) {
- // error popup before you can proceed
- return App.ModalPopup.show({
- header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
- bodyClass: Ember.View.extend({
- template: Ember.Handlebars.compile( Em.I18n.t('installer.step7.popup.mySQLWarning.body'))
- }),
- secondary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.gotostep5'),
- primary: Em.I18n.t('installer.step7.popup.mySQLWarning.button.dismiss'),
- onSecondary: function (){
- var parent = this;
- return App.ModalPopup.show({
- header: Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.header'),
- bodyClass: Ember.View.extend({
- template: Ember.Handlebars.compile( Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.body'))
- }),
- onPrimary: function (){
- this.hide();
- parent.hide();
- // go back to step 5: assign masters and disable default navigation warning
- App.router.get('installerController').gotoStep(5, true);
- }
- });
- }
- });
- } else {
- App.router.send('next');
- }
- });
- } else {
- App.router.send('next');
- }
+ this.resolveHiveMysqlDatabase();
}
}