|
@@ -140,6 +140,13 @@ App.WizardStep5Controller = Em.Controller.extend({
|
|
*/
|
|
*/
|
|
generalWarningMessages: [],
|
|
generalWarningMessages: [],
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * true if any warning exists
|
|
|
|
+ */
|
|
|
|
+ anyWarning: function() {
|
|
|
|
+ return this.get('servicesMasters').some(function(m) { return m.get('warnMessage'); }) || this.get('generalWarningMessages').some(function(m) { return m; });
|
|
|
|
+ }.property('servicesMasters.@each.warnMessage', 'generalWarningMessages'),
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* List of host with assigned masters
|
|
* List of host with assigned masters
|
|
* Format:
|
|
* Format:
|
|
@@ -274,8 +281,8 @@ App.WizardStep5Controller = Em.Controller.extend({
|
|
updateValidationsSuccessCallback: function (data) {
|
|
updateValidationsSuccessCallback: function (data) {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
- this.set('generalErrorMessages', []);
|
|
|
|
- this.set('generalWarningMessages', []);
|
|
|
|
|
|
+ generalErrorMessages = [];
|
|
|
|
+ generalWarningMessages = [];
|
|
this.get('servicesMasters').setEach('warnMessage', null);
|
|
this.get('servicesMasters').setEach('warnMessage', null);
|
|
this.get('servicesMasters').setEach('errorMessage', null);
|
|
this.get('servicesMasters').setEach('errorMessage', null);
|
|
var anyErrors = false;
|
|
var anyErrors = false;
|
|
@@ -296,13 +303,16 @@ App.WizardStep5Controller = Em.Controller.extend({
|
|
var details = " (" + item['component-name'] + " on " + item.host + ")";
|
|
var details = " (" + item['component-name'] + " on " + item.host + ")";
|
|
if (item.level === 'ERROR') {
|
|
if (item.level === 'ERROR') {
|
|
anyErrors = true;
|
|
anyErrors = true;
|
|
- self.get('generalErrorMessages').push(item.message + details);
|
|
|
|
|
|
+ generalErrorMessages.push(item.message + details);
|
|
} else if (item.level === 'WARN') {
|
|
} else if (item.level === 'WARN') {
|
|
- self.get('generalWarningMessages').push(item.message + details);
|
|
|
|
|
|
+ generalWarningMessages.push(item.message + details);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ this.set('generalErrorMessages', generalErrorMessages);
|
|
|
|
+ this.set('generalWarningMessages', generalWarningMessages);
|
|
|
|
+
|
|
this.set('submitDisabled', anyErrors);
|
|
this.set('submitDisabled', anyErrors);
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1030,19 +1040,35 @@ App.WizardStep5Controller = Em.Controller.extend({
|
|
submit: function () {
|
|
submit: function () {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
- var goNextStepIfValid = function() {
|
|
|
|
- if (!self.get('submitDisabled')) {
|
|
|
|
- App.router.send('next');
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
|
|
+ var primary = function() {
|
|
|
|
+ var goNextStepIfValid = function() {
|
|
|
|
+ if (!self.get('submitDisabled')) {
|
|
|
|
+ App.router.send('next');
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
|
|
- if (App.supports.serverRecommendValidate ) {
|
|
|
|
- self.recommendAndValidate(function() {
|
|
|
|
|
|
+ if (App.supports.serverRecommendValidate ) {
|
|
|
|
+ self.recommendAndValidate(function() {
|
|
|
|
+ goNextStepIfValid();
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ self.updateIsSubmitDisabled();
|
|
goNextStepIfValid();
|
|
goNextStepIfValid();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (self.get('anyWarning')) {
|
|
|
|
+ App.ModalPopup.show({
|
|
|
|
+ primary: Em.I18n.t('common.continueAnyway'),
|
|
|
|
+ header: Em.I18n.t('installer.step5.warningsAttention.header'),
|
|
|
|
+ body: Em.I18n.t('installer.step5.warningsAttention'),
|
|
|
|
+ onPrimary: function () {
|
|
|
|
+ this.hide();
|
|
|
|
+ primary();
|
|
|
|
+ }
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
- self.updateIsSubmitDisabled();
|
|
|
|
- goNextStepIfValid();
|
|
|
|
|
|
+ primary();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
});
|
|
});
|