ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject ambari git commit: AMBARI-12675 Config load time optimization. (ababiichuk)
Date Fri, 07 Aug 2015 14:36:24 GMT
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 <ababiichuk@cybervisiontech.com>
Authored: Fri Aug 7 17:30:17 2015 +0300
Committer: aBabiichuk <ababiichuk@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]);


Mime
View raw message