You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/06/07 20:23:51 UTC

svn commit: r1490773 - /incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js

Author: yusaku
Date: Fri Jun  7 18:23:51 2013
New Revision: 1490773

URL: http://svn.apache.org/r1490773
Log:
AMBARI-2313. UI allows adding already existing properties to custom core-site.xml /hdfs-site.xml settings and creates confusion. (Oleg Nechiporenko via yusaku)

Modified:
    incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js

Modified: incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js?rev=1490773&r1=1490772&r2=1490773&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js Fri Jun  7 18:23:51 2013
@@ -178,7 +178,7 @@ App.ServiceConfigsByCategoryView = Ember
     return category.indexOf("Advanced") != -1;
   },
   showAddPropertyWindow: function (event) {
-    var serviceConfigNames = this.get('categoryConfigs').mapProperty('name');
+    var allConfigs = this.get('service.configs').filterProperty('serviceName',this.get('service.serviceName'));
     var serviceConfigObj = Ember.Object.create({
       name: '',
       value: '',
@@ -192,7 +192,7 @@ App.ServiceConfigsByCategoryView = Ember
         if(name.trim() != ""){
           if(validator.isValidConfigKey(name)){
             var configMappingProperty = App.config.get('configMapping').all().findProperty('name', name);
-            if((configMappingProperty == null) && (!serviceConfigNames.contains(name))){
+            if((configMappingProperty == null) && (!allConfigs.findProperty('name',name))){
               this.set("isKeyError", false);
               this.set("errorMessage", "");
             } else {