Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D752B17F15 for ; Sat, 25 Oct 2014 19:53:51 +0000 (UTC) Received: (qmail 57185 invoked by uid 500); 25 Oct 2014 19:53:51 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 57150 invoked by uid 500); 25 Oct 2014 19:53:51 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 57141 invoked by uid 99); 25 Oct 2014 19:53:51 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Oct 2014 19:53:51 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8277C894E61; Sat, 25 Oct 2014 19:53:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: atkach@apache.org To: commits@ambari.apache.org Message-Id: <000d4c073287412c996e7cddef7b75dc@git.apache.org> X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Sat Oct 25 22:53:32 2014 +0300 Committer: atkach 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 ) {