|
@@ -70,9 +70,23 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
|
|
|
App.config.setPreDefinedServiceConfigs(this.get('addMiscTabToPage'));
|
|
|
//STEP 4: Add advanced configs
|
|
|
App.config.addAdvancedConfigs(configs, advancedConfigs);
|
|
|
+ this.showAdConfigs(configs);
|
|
|
this.applyServicesConfigs(configs, storedConfigs);
|
|
|
},
|
|
|
|
|
|
+ /**
|
|
|
+ * Make Active Directory specific configs visible if user has selected AD option
|
|
|
+ * @param configs
|
|
|
+ */
|
|
|
+ showAdConfigs: function (configs) {
|
|
|
+ var kdcType = this.get('content.kerberosOption');
|
|
|
+ var configNames = ['ldap_url', 'container_dn'];
|
|
|
+ configNames.forEach(function (_configName) {
|
|
|
+ var config = configs.findProperty('name', _configName);
|
|
|
+ config.isVisible = kdcType === Em.I18n.t('admin.kerberos.wizard.step1.option.ad');
|
|
|
+ }, this);
|
|
|
+ },
|
|
|
+
|
|
|
submit: function () {
|
|
|
this.set('isSubmitDisabled', true);
|
|
|
var self = this;
|
|
@@ -87,7 +101,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
|
|
|
self.createKerberosComponent().done(function () {
|
|
|
self.createKerberosHostComponents().done(function () {
|
|
|
self.createConfigurations().done(function () {
|
|
|
- self.createKerberosAdminSession().done(function() {
|
|
|
+ self.createKerberosAdminSession().done(function () {
|
|
|
App.router.send('next');
|
|
|
});
|
|
|
});
|
|
@@ -132,7 +146,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- createKerberosHostComponents: function() {
|
|
|
+ createKerberosHostComponents: function () {
|
|
|
var hostNames = this.get('content.hosts');
|
|
|
var queryStr = '';
|
|
|
hostNames.forEach(function (hostName) {
|
|
@@ -215,7 +229,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
|
|
|
return {"type": site, "tag": tag, "properties": properties};
|
|
|
},
|
|
|
|
|
|
- tweakKdcTypeValue: function(properties) {
|
|
|
+ tweakKdcTypeValue: function (properties) {
|
|
|
if (properties['kdc_type'] === Em.I18n.t('admin.kerberos.wizard.step1.option.kdc')) {
|
|
|
properties['kdc_type'] = "mit-kdc";
|
|
|
} else if (properties['kdc_type'] === Em.I18n.t('admin.kerberos.wizard.step1.option.ad')) {
|
|
@@ -229,16 +243,16 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
|
|
|
*/
|
|
|
createKerberosAdminSession: function () {
|
|
|
var configs = this.get('stepConfigs')[0].get('configs');
|
|
|
- var adminPrincipalValue = configs.findProperty('name','admin_principal').value;
|
|
|
- var adminPasswordValue = configs.findProperty('name','admin_password').value;
|
|
|
+ var adminPrincipalValue = configs.findProperty('name', 'admin_principal').value;
|
|
|
+ var adminPasswordValue = configs.findProperty('name', 'admin_password').value;
|
|
|
return App.ajax.send({
|
|
|
name: 'common.cluster.update',
|
|
|
sender: this,
|
|
|
data: {
|
|
|
clusterName: App.get('clusterName') || App.clusterStatus.get('clusterName'),
|
|
|
data: [{
|
|
|
- session_attributes : {
|
|
|
- kerberos_admin : {principal : adminPrincipalValue, password : adminPasswordValue}
|
|
|
+ session_attributes: {
|
|
|
+ kerberos_admin: {principal: adminPrincipalValue, password: adminPasswordValue}
|
|
|
}
|
|
|
}]
|
|
|
}
|