You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2013/07/09 22:50:03 UTC

git commit: AMBARI-2595: Properties of the same name cannot be added to different custom site.xml's. (Andrii via jaimin)

Updated Branches:
  refs/heads/trunk 676567f8f -> 93cdf494b


AMBARI-2595: Properties of the same name cannot be added to different custom site.xml's. (Andrii via jaimin)


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

Branch: refs/heads/trunk
Commit: 93cdf494b4f5be33fb9ed38e4e3b3a0ae60c1bba
Parents: 676567f
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue Jul 9 13:44:38 2013 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue Jul 9 13:44:38 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/views/common/configs/services_config.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/93cdf494/ambari-web/app/views/common/configs/services_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/configs/services_config.js b/ambari-web/app/views/common/configs/services_config.js
index 050cefd..27b5fbe 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -332,7 +332,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
     return category.indexOf("Advanced") != -1;
   },
   showAddPropertyWindow: function (event) {
-    var allConfigs = this.get('service.configs').filterProperty('serviceName', this.get('service.serviceName'));
+    var configsOfFile = this.get('service.configs').filterProperty('filename', this.get('category.siteFileName'));
     var serviceConfigObj = Ember.Object.create({
       name: '',
       value: '',
@@ -346,7 +346,7 @@ App.ServiceConfigsByCategoryView = Ember.View.extend({
         if (name.trim() != "") {
           if (validator.isValidConfigKey(name)) {
             var configMappingProperty = App.config.get('configMapping').all().findProperty('name', name);
-            if ((configMappingProperty == null) && (!allConfigs.findProperty('name', name))) {
+            if ((configMappingProperty == null) && (!configsOfFile.findProperty('name', name))) {
               this.set("isKeyError", false);
               this.set("errorMessage", "");
             } else {