Преглед изворни кода

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

aBabiichuk пре 10 година
родитељ
комит
c2ecbdf6e8
2 измењених фајлова са 8 додато и 4 уклоњено
  1. 6 2
      ambari-web/app/controllers/wizard.js
  2. 2 2
      ambari-web/test/controllers/wizard_test.js

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

@@ -46,7 +46,10 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
     'serviceComponents'
   ],
 
-  sensibleConfigs: ['admin_principal', 'admin_password'],
+  sensibleConfigs: [
+    { name: 'admin_principal', filename: 'krb5-conf.xml'},
+    { name: 'admin_password',  filename: 'krb5-conf.xml' }
+  ],
 
   init: function () {
     this.clusters = App.Cluster.find();
@@ -886,7 +889,8 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
   },
 
   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,
               defaultIsFinal: true,
               supportsFinal: true,
-              filename: 'filename',
+              filename: 'krb5-conf.xml',
               displayType: 'string',
               isRequiredByAgent: true,
               hasInitialValue: true,
@@ -964,7 +964,7 @@ describe('App.WizardController', function () {
               isFinal: true,
               defaultIsFinal: true,
               supportsFinal: true,
-              filename: 'filename',
+              filename: 'krb5-conf.xml',
               displayType: 'string',
               isRequiredByAgent: true,
               hasInitialValue: true,