ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From atk...@apache.org
Subject git commit: AMBARI-7947 [Perf400] Hive and other tabs rendering too slow during Customize service wizard, addtional patch.(atkach)
Date Sat, 25 Oct 2014 19:53:51 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 217f43d0d -> 101c41a49


AMBARI-7947 [Perf400] Hive and other tabs rendering too slow during Customize service wizard,
addtional patch.(atkach)


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

Branch: refs/heads/trunk
Commit: 101c41a49c7e7a3ed7892e2fe70e620596ab4d1c
Parents: 217f43d
Author: atkach <atkach@hortonworks.com>
Authored: Sat Oct 25 22:53:32 2014 +0300
Committer: atkach <atkach@hortonworks.com>
Committed: Sat Oct 25 22:53:32 2014 +0300

----------------------------------------------------------------------
 .../app/views/common/configs/services_config.js | 51 +++++++++++---------
 1 file changed, 27 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/101c41a4/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 3e56c40..f70df1a 100644
--- a/ambari-web/app/views/common/configs/services_config.js
+++ b/ambari-web/app/views/common/configs/services_config.js
@@ -348,37 +348,40 @@ App.ServiceConfigsByCategoryView = Ember.View.extend(App.UserPref, {
    */
   filteredCategoryConfigs: function () {
     $('.popover').remove();
-    if (this.get('state') !== 'inDOM') return this.get('categoryConfigs');
     var filter = this.get('parentView.filter').toLowerCase();
     var selectedFilters = this.get('parentView.columns').filterProperty('selected');
-    var filteredResult = this.get('categoryConfigs').filter(function (config) {
-      var passesFilters = true;
+    var filteredResult = this.get('categoryConfigs')
 
-      selectedFilters.forEach(function (filter) {
-        if (config.get(filter.attributeName) !== filter.attributeValue) {
-          passesFilters = false;
-        }
-      });
+    if (this.get('state') === 'inDOM') {
+      filteredResult = filteredResult.filter(function (config) {
+        var passesFilters = true;
 
-      if (!passesFilters) {
-        return false;
-      }
+        selectedFilters.forEach(function (filter) {
+          if (config.get(filter.attributeName) !== filter.attributeValue) {
+            passesFilters = false;
+          }
+        });
+
+        if (!passesFilters) {
+          return false;
+        }
 
-      var searchString = config.get('defaultValue') + config.get('description') +
-        config.get('displayName') + config.get('name') + config.get('value');
+        var searchString = config.get('defaultValue') + config.get('description') +
+          config.get('displayName') + config.get('name') + config.get('value');
 
-     if (config.get('overrides')) {
-       config.get('overrides').forEach(function(overriddenConf){
-         searchString += overriddenConf.get('value') + overriddenConf.get('group.name');
-       });
-     }
+        if (config.get('overrides')) {
+          config.get('overrides').forEach(function (overriddenConf) {
+            searchString += overriddenConf.get('value') + overriddenConf.get('group.name');
+          });
+        }
 
-     if (filter != null && typeof searchString === "string") {
-       return searchString.toLowerCase().indexOf(filter) > -1;
-     } else {
-       return true;
-     }
-    });
+        if (filter != null && typeof searchString === "string") {
+          return searchString.toLowerCase().indexOf(filter) > -1;
+        } else {
+          return true;
+        }
+      });
+    }
     filteredResult = this.sortByIndex(filteredResult);
 
     if (filter && filteredResult.length ) {


Mime
View raw message