|
@@ -89,9 +89,7 @@ App.ManageAlertNotificationsController = Em.Controller.extend({
|
|
label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPUseAuthentication'),
|
|
label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPUseAuthentication'),
|
|
value: false,
|
|
value: false,
|
|
defaultValue: false,
|
|
defaultValue: false,
|
|
- inversedValue: function () {
|
|
|
|
- return !this.get('value');
|
|
|
|
- }.property('value')
|
|
|
|
|
|
+ invertedValue: Em.computed.not('value')
|
|
}),
|
|
}),
|
|
SMTPUsername: {
|
|
SMTPUsername: {
|
|
label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPUsername'),
|
|
label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPUsername'),
|
|
@@ -103,6 +101,11 @@ App.ManageAlertNotificationsController = Em.Controller.extend({
|
|
value: '',
|
|
value: '',
|
|
defaultValue: ''
|
|
defaultValue: ''
|
|
},
|
|
},
|
|
|
|
+ retypeSMTPPassword: {
|
|
|
|
+ label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.retypeSMTPPassword'),
|
|
|
|
+ value: '',
|
|
|
|
+ defaultValue: ''
|
|
|
|
+ },
|
|
SMTPSTARTTLS: {
|
|
SMTPSTARTTLS: {
|
|
label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPSTARTTLS'),
|
|
label: Em.I18n.t('alerts.actions.manage_alert_notifications_popup.SMTPSTARTTLS'),
|
|
value: false,
|
|
value: false,
|
|
@@ -290,6 +293,7 @@ App.ManageAlertNotificationsController = Em.Controller.extend({
|
|
inputFields.set('SMTPUseAuthentication.value', selectedAlertNotification.get('properties')['mail.smtp.auth']);
|
|
inputFields.set('SMTPUseAuthentication.value', selectedAlertNotification.get('properties')['mail.smtp.auth']);
|
|
inputFields.set('SMTPUsername.value', selectedAlertNotification.get('properties')['ambari.dispatch.credential.username']);
|
|
inputFields.set('SMTPUsername.value', selectedAlertNotification.get('properties')['ambari.dispatch.credential.username']);
|
|
inputFields.set('SMTPPassword.value', selectedAlertNotification.get('properties')['ambari.dispatch.credential.password']);
|
|
inputFields.set('SMTPPassword.value', selectedAlertNotification.get('properties')['ambari.dispatch.credential.password']);
|
|
|
|
+ inputFields.set('retypeSMTPPassword.value', selectedAlertNotification.get('properties')['ambari.dispatch.credential.password']);
|
|
inputFields.set('SMTPSTARTTLS.value', selectedAlertNotification.get('properties')['mail.smtp.starttls.enable']);
|
|
inputFields.set('SMTPSTARTTLS.value', selectedAlertNotification.get('properties')['mail.smtp.starttls.enable']);
|
|
inputFields.set('emailFrom.value', selectedAlertNotification.get('properties')['mail.smtp.from']);
|
|
inputFields.set('emailFrom.value', selectedAlertNotification.get('properties')['mail.smtp.from']);
|
|
inputFields.set('version.value', selectedAlertNotification.get('properties')['ambari.dispatch.snmp.version']);
|
|
inputFields.set('version.value', selectedAlertNotification.get('properties')['ambari.dispatch.snmp.version']);
|
|
@@ -338,6 +342,7 @@ App.ManageAlertNotificationsController = Em.Controller.extend({
|
|
this.emailFromValidation();
|
|
this.emailFromValidation();
|
|
this.smtpPortValidation();
|
|
this.smtpPortValidation();
|
|
this.portValidation();
|
|
this.portValidation();
|
|
|
|
+ this.retypePasswordValidation();
|
|
},
|
|
},
|
|
|
|
|
|
isEmailMethodSelected: function () {
|
|
isEmailMethodSelected: function () {
|
|
@@ -392,6 +397,18 @@ App.ManageAlertNotificationsController = Em.Controller.extend({
|
|
}
|
|
}
|
|
}.observes('controller.inputFields.port.value'),
|
|
}.observes('controller.inputFields.port.value'),
|
|
|
|
|
|
|
|
+ retypePasswordValidation: function () {
|
|
|
|
+ var passwordValue = this.get('controller.inputFields.SMTPPassword.value');
|
|
|
|
+ var retypePasswordValue = this.get('controller.inputFields.retypeSMTPPassword.value');
|
|
|
|
+ if (passwordValue !== retypePasswordValue) {
|
|
|
|
+ this.set('parentView.hasErrors', true);
|
|
|
|
+ this.set('controller.inputFields.retypeSMTPPassword.errorMsg', Em.I18n.t('alerts.notifications.error.retypePassword'));
|
|
|
|
+ } else {
|
|
|
|
+ this.set('parentView.hasErrors', false);
|
|
|
|
+ this.set('controller.inputFields.retypeSMTPPassword.errorMsg', null);
|
|
|
|
+ }
|
|
|
|
+ }.observes('controller.inputFields.retypeSMTPPassword.value', 'controller.inputFields.SMTPPassword.value'),
|
|
|
|
+
|
|
|
|
|
|
groupsSelectView: Em.Select.extend({
|
|
groupsSelectView: Em.Select.extend({
|
|
attributeBindings: ['disabled'],
|
|
attributeBindings: ['disabled'],
|