You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/08/07 16:36:24 UTC

ambari git commit: AMBARI-12675 Config load time optimization. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk 8565ccdb5 -> f5f3d7539


AMBARI-12675 Config load time optimization. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: f5f3d7539f2295fe25952a5f4e26bb66280e2ec6
Parents: 8565ccd
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Fri Aug 7 17:30:17 2015 +0300
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Fri Aug 7 17:31:03 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/utils/config.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f5f3d753/ambari-web/app/utils/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/config.js b/ambari-web/app/utils/config.js
index bb4cc3d..7d8c0dd 100644
--- a/ambari-web/app/utils/config.js
+++ b/ambari-web/app/utils/config.js
@@ -277,10 +277,10 @@ App.config = Em.Object.create({
       for (var index in properties) {
         var id = this.configId(index, siteConfig.type);
         var configsPropertyDef = this.get('preDefinedSitePropertiesMap')[id];
-        var advancedConfig = App.StackConfigProperty.find().findProperty('id', id);
-
-        var template = this.createDefaultConfig(index, filename, !!advancedConfig, configsPropertyDef);
-        var serviceConfigObj = this.mergeStaticProperties(template, advancedConfig);
+        var advancedConfig = App.StackConfigProperty.find(id);
+        var isStackProperty = !!advancedConfig.get('id');
+        var template = this.createDefaultConfig(index, filename, isStackProperty, configsPropertyDef);
+        var serviceConfigObj = isStackProperty ? this.mergeStaticProperties(template, advancedConfig) : template;
 
         if (serviceConfigObj.isRequiredByAgent !== false) {
           var formattedValue = this.formatPropertyValue(serviceConfigObj, properties[index]);