Browse Source

AMBARI-12646 Add service sets ranger 'admin_password' property value to ''. (ababiichuk)

aBabiichuk 10 years ago
parent
commit
c2ecbdf6e8

+ 6 - 2
ambari-web/app/controllers/wizard.js

@@ -46,7 +46,10 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
     'serviceComponents'
     'serviceComponents'
   ],
   ],
 
 
-  sensibleConfigs: ['admin_principal', 'admin_password'],
+  sensibleConfigs: [
+    { name: 'admin_principal', filename: 'krb5-conf.xml'},
+    { name: 'admin_password',  filename: 'krb5-conf.xml' }
+  ],
 
 
   init: function () {
   init: function () {
     this.clusters = App.Cluster.find();
     this.clusters = App.Cluster.find();
@@ -886,7 +889,8 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
   },
   },
 
 
   isExcludedConfig: function (configProperty) {
   isExcludedConfig: function (configProperty) {
-    return this.get('sensibleConfigs').indexOf(configProperty.name) > -1;
+    return this.get('sensibleConfigs').mapProperty('name').indexOf(configProperty.name) > -1
+      && this.get('sensibleConfigs').mapProperty('filename').indexOf(configProperty.filename) > -1;
   },
   },
 
 
   /**
   /**

+ 2 - 2
ambari-web/test/controllers/wizard_test.js

@@ -941,7 +941,7 @@ describe('App.WizardController', function () {
               isFinal: true,
               isFinal: true,
               defaultIsFinal: true,
               defaultIsFinal: true,
               supportsFinal: true,
               supportsFinal: true,
-              filename: 'filename',
+              filename: 'krb5-conf.xml',
               displayType: 'string',
               displayType: 'string',
               isRequiredByAgent: true,
               isRequiredByAgent: true,
               hasInitialValue: true,
               hasInitialValue: true,
@@ -964,7 +964,7 @@ describe('App.WizardController', function () {
               isFinal: true,
               isFinal: true,
               defaultIsFinal: true,
               defaultIsFinal: true,
               supportsFinal: true,
               supportsFinal: true,
-              filename: 'filename',
+              filename: 'krb5-conf.xml',
               displayType: 'string',
               displayType: 'string',
               isRequiredByAgent: true,
               isRequiredByAgent: true,
               hasInitialValue: true,
               hasInitialValue: true,