incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject svn commit: r1490773 - /incubator/ambari/trunk/ambari-web/app/views/common/configs/services_config.js
Date Fri, 07 Jun 2013 18:23:51 GMT
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 {



Mime
View raw message