|
@@ -1242,9 +1242,9 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
|
|
getAmbariDatabaseSuccess: function (data) {
|
|
getAmbariDatabaseSuccess: function (data) {
|
|
var hiveDBHostname = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_hostname').value;
|
|
var hiveDBHostname = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_hostname').value;
|
|
var ambariServiceHostComponents = data.hostComponents;
|
|
var ambariServiceHostComponents = data.hostComponents;
|
|
- if (!!ambariServiceHostComponents.length) {
|
|
|
|
|
|
+ if (ambariServiceHostComponents.length) {
|
|
var ambariDBInfo = JSON.stringify(ambariServiceHostComponents[0].RootServiceHostComponents.properties);
|
|
var ambariDBInfo = JSON.stringify(ambariServiceHostComponents[0].RootServiceHostComponents.properties);
|
|
- this.set('mySQLServerConflict', ambariDBInfo.indexOf('mysql') > 0 && ambariDBInfo.indexOf(hiveDBHostname) > 0);
|
|
|
|
|
|
+ this.set('mySQLServerConflict', ambariDBInfo.contains('mysql') && ambariDBInfo.indexOf(hiveDBHostname) > 0);
|
|
} else {
|
|
} else {
|
|
this.set('mySQLServerConflict', false);
|
|
this.set('mySQLServerConflict', false);
|
|
}
|
|
}
|
|
@@ -1266,34 +1266,63 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
|
|
var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value;
|
|
var hiveDBType = this.get('stepConfigs').findProperty('serviceName', 'HIVE').configs.findProperty('name', 'hive_database').value;
|
|
if (hiveDBType == 'New MySQL Database') {
|
|
if (hiveDBType == 'New MySQL Database') {
|
|
var self = this;
|
|
var self = this;
|
|
- this.checkMySQLHost().done(function () {
|
|
|
|
- if (self.get('mySQLServerConflict')) {
|
|
|
|
- // error popup before you can proceed
|
|
|
|
|
|
+ return this.checkMySQLHost().done(function () {
|
|
|
|
+ self.mySQLWarningHandler();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.moveNext();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Show warning popup about MySQL-DB issues (on post-submit)
|
|
|
|
+ *
|
|
|
|
+ * @returns {*}
|
|
|
|
+ * @method mySQLWarningHandler
|
|
|
|
+ */
|
|
|
|
+ mySQLWarningHandler: function () {
|
|
|
|
+ var self = this;
|
|
|
|
+ if (this.get('mySQLServerConflict')) {
|
|
|
|
+ // error popup before you can proceed
|
|
|
|
+ return App.ModalPopup.show({
|
|
|
|
+ header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
|
|
|
|
+ body: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'),
|
|
|
|
+ encodeBody: false,
|
|
|
|
+ onPrimary: function () {
|
|
|
|
+ this._super();
|
|
|
|
+ self.set('submitButtonClicked', false);
|
|
|
|
+ },
|
|
|
|
+ onSecondary: function () {
|
|
|
|
+ var parent = this;
|
|
return App.ModalPopup.show({
|
|
return App.ModalPopup.show({
|
|
- header: Em.I18n.t('installer.step7.popup.mySQLWarning.header'),
|
|
|
|
- body: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'),
|
|
|
|
- body: 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);
|
|
|
|
|
|
+ header: Em.I18n.t('installer.step7.popup.mySQLWarning.confirmation.header'),
|
|
|
|
+ body: 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
|
|
|
|
+ if ('installerController' === self.get('content.controllerName')) {
|
|
|
|
+ App.router.get('installerController').gotoStep(5, true);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ if ('addServiceController' === self.get('content.controllerName')) {
|
|
|
|
+ App.router.get('addServiceController').gotoStep(2, true);
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onSecondary: function () {
|
|
|
|
+ this._super();
|
|
|
|
+ self.set('submitButtonClicked', false);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- } else {
|
|
|
|
- self.moveNext();
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- } else {
|
|
|
|
- this.moveNext();
|
|
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ return this.moveNext();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1416,6 +1445,7 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
|
|
**/
|
|
**/
|
|
moveNext: function () {
|
|
moveNext: function () {
|
|
App.router.send('next');
|
|
App.router.send('next');
|
|
|
|
+ this.set('submitButtonClicked', false);
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -1462,7 +1492,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
|
|
this.showOozieDerbyWarningPopup(function() {
|
|
this.showOozieDerbyWarningPopup(function() {
|
|
self.checkDatabaseConnectionTest().done(function () {
|
|
self.checkDatabaseConnectionTest().done(function () {
|
|
self.resolveHiveMysqlDatabase();
|
|
self.resolveHiveMysqlDatabase();
|
|
- self.set('submitButtonClicked', false);
|
|
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|