Просмотр исходного кода

AMBARI-3708. Reconfigure of dynamic configs not showing modified values. (srimanth)

Srimanth Gunturi 11 лет назад
Родитель
Сommit
9530083bb8

+ 11 - 8
ambari-web/app/controllers/main/service/info/configs.js

@@ -536,14 +536,17 @@ App.MainServiceInfoConfigsController = Em.Controller.extend({
       }
       if (serviceConfigProperty.get('serviceName') === this.get('content.serviceName')) {
 
-        defaults.forEach(function(defaults) {
-          for(var name in defaults) {
-            if (serviceConfigProperty.name == name) {
-              serviceConfigProperty.set('value', defaults[name]);
-              serviceConfigProperty.set('defaultValue', defaults[name]);
-            }
-          }
-        });
+        // Do not reset values when reconfiguring.
+        // This might be useful to setting better descriptions
+        // or default values sometime in the future.
+        // defaults.forEach(function(defaults) {
+        //   for(var name in defaults) {
+        //    if (serviceConfigProperty.name == name) {
+        //       serviceConfigProperty.set('value', defaults[name]);
+        //       serviceConfigProperty.set('defaultValue', defaults[name]);
+        //     }
+        //   }
+        // });
 
         if (s.configsValidator) {
           var validators = s.configsValidator.get('configValidators');

+ 3 - 3
ambari-web/app/utils/configs/validators/mapreduce2_configs_validator.js

@@ -39,11 +39,11 @@ App.MapReduce2ConfigsValidator = App.ServiceConfigsValidator.create({
   configProperties: [],
 
   mapreduceMapJavaOpts: function(config) {
-    return this.validatorLessThenDefaultValue(config);
+    return null;
   },
 
   mapreduceReduceJavaOpts: function(config) {
-	return this.validatorLessThenDefaultValue(config);
+    return null;
   },
 
   mapreduceTaskIoSortMb: function(config) {
@@ -63,7 +63,7 @@ App.MapReduce2ConfigsValidator = App.ServiceConfigsValidator.create({
   },
 
   yarnAppMapreduceAmCommandOpts: function(config) {
-    return this.validatorLessThenDefaultValue(config);
+    return null;
   }
 
 });