Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 4e6576299 -> bb2ccc504


AMBARI-11976 hbase.coprocessor.regionserver.classes should allow blank as a 
valid value. (ababiichuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bb2ccc50
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bb2ccc50
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bb2ccc50

Branch: refs/heads/branch-2.1
Commit: bb2ccc504f0a5f2582d50d999edb099e809a1907
Parents: 4e65762
Author: aBabiichuk <[email protected]>
Authored: Wed Jun 17 19:08:31 2015 +0300
Committer: aBabiichuk <[email protected]>
Committed: Wed Jun 17 19:11:58 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/data/HDP2/site_properties.js              | 9 +++++++++
 ambari-web/app/mixins/common/configs/enhanced_configs.js | 8 ++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bb2ccc50/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js 
b/ambari-web/app/data/HDP2/site_properties.js
index ebdbb18..ccea488 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -852,6 +852,15 @@ var hdp2properties = [
   },
   {
     "id": "site property",
+    "name": "hbase.coprocessor.regionserver.classes",
+    "displayName": "hbase.coprocessor.regionserver.classes",
+    "category": "Advanced hbase-site",
+    "isRequired": false,
+    "serviceName": "HBASE",
+    "filename": "hbase-site.xml"
+  },
+  {
+    "id": "site property",
     "name": "hbase.zookeeper.quorum",
     "displayName": "hbase.zookeeper.quorum",
     "displayType": "multiLine",

http://git-wip-us.apache.org/repos/asf/ambari/blob/bb2ccc50/ambari-web/app/mixins/common/configs/enhanced_configs.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/common/configs/enhanced_configs.js 
b/ambari-web/app/mixins/common/configs/enhanced_configs.js
index f530b27..5e57e7c 100644
--- a/ambari-web/app/mixins/common/configs/enhanced_configs.js
+++ b/ambari-web/app/mixins/common/configs/enhanced_configs.js
@@ -595,6 +595,10 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
           if (Em.get(propertyToAdd, 'isDeleted')) {
             this.get('_dependentConfigValues').removeObject(propertyToAdd);
           }
+          var originalFileName = 
App.config.getOriginalFileName(Em.get(propertyToAdd, 'fileName'));
+          var predefinedProperty = App.config.get('preDefinedSiteProperties')
+                .filterProperty('filename', originalFileName)
+                .findProperty('name', Em.get(propertyToAdd, 'propertyName'));
           var addedProperty = App.ServiceConfigProperty.create({
             name: Em.get(propertyToAdd, 'propertyName'),
             displayName: Em.get(propertyToAdd, 'propertyName'),
@@ -603,9 +607,9 @@ App.EnhancedConfigsMixin = Em.Mixin.create({
             savedValue: null,
             category: 'Advanced ' + Em.get(propertyToAdd, 'fileName'),
             serviceName: stepConfigs.get('serviceName'),
-            filename: App.config.getOriginalFileName(Em.get(propertyToAdd, 
'fileName')),
+            filename: originalFileName,
             isNotSaved: !Em.get(propertyToAdd, 'isDeleted'),
-            isRequired: true
+            isRequired:  predefinedProperty ? 
Em.getWithDefault(predefinedProperty, 'isRequired', true) : true
           });
           stepConfigs.get('configs').pushObject(addedProperty);
           addedProperty.validate();

Reply via email to