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 71F55180CF for ; Thu, 13 Aug 2015 15:18:48 +0000 (UTC) Received: (qmail 1778 invoked by uid 500); 13 Aug 2015 15:18:48 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 1750 invoked by uid 500); 13 Aug 2015 15:18:48 -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 1741 invoked by uid 99); 13 Aug 2015 15:18:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Aug 2015 15:18:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2057DE6B10; Thu, 13 Aug 2015 15:18:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: akovalenko@apache.org To: commits@ambari.apache.org Message-Id: <895d71a298e14dd7bc6557498882d4c3@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: ambari git commit: AMBARI-12762. FE: Uninstalled components in Host->Filter by component (akovalenko) Date: Thu, 13 Aug 2015 15:18:48 +0000 (UTC) Repository: ambari Updated Branches: refs/heads/branch-2.1 368d8f5cd -> e1951d4f9 AMBARI-12762. FE: Uninstalled components in Host->Filter by component (akovalenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e1951d4f Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e1951d4f Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e1951d4f Branch: refs/heads/branch-2.1 Commit: e1951d4f9a2d5af4677cd395fa3f128ff711f03a Parents: 368d8f5 Author: Aleksandr Kovalenko Authored: Thu Aug 13 18:18:30 2015 +0300 Committer: Aleksandr Kovalenko Committed: Thu Aug 13 18:18:30 2015 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host.js | 10 ---------- ambari-web/app/views/main/host.js | 29 ++++++++++++---------------- 2 files changed, 12 insertions(+), 27 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e1951d4f/ambari-web/app/controllers/main/host.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host.js b/ambari-web/app/controllers/main/host.js index aa82645..d660779 100644 --- a/ambari-web/app/controllers/main/host.js +++ b/ambari-web/app/controllers/main/host.js @@ -67,15 +67,6 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { * true if from details page */ isDrillUp: false, - /** - * Components which will be shown in component filter - * @returns {Array} - */ - componentsForFilter: function () { - var installedComponents = App.StackServiceComponent.find().toArray(); - installedComponents.setEach('checkedForHostFilter', false); - return installedComponents; - }.property('App.router.clusterController.isLoaded'), content: App.Host.find(), @@ -489,7 +480,6 @@ App.MainHostController = Em.ArrayController.extend(App.TableServerMixin, { return; var id = component.get('componentName'); var column = 6; - this.get('componentsForFilter').setEach('checkedForHostFilter', false); var filterForComponent = { iColumn: column, http://git-wip-us.apache.org/repos/asf/ambari/blob/e1951d4f/ambari-web/app/views/main/host.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/host.js b/ambari-web/app/views/main/host.js index e0f1cbf..dc6e904 100644 --- a/ambari-web/app/views/main/host.js +++ b/ambari-web/app/views/main/host.js @@ -927,40 +927,35 @@ App.MainHostView = App.TableView.extend(App.TableServerViewMixin, { filterView: filters.componentFieldView.extend({ templateName: require('templates/main/host/component_filter'), - - /** - * Components which will be shown in component filter - * @returns {Array} - */ - componentsForFilter: function () { - var installedComponents = App.StackServiceComponent.find().toArray(); - installedComponents.setEach('checkedForHostFilter', false); - return installedComponents; - }.property('App.router.clusterController.isLoaded'), - /** * Master components * @returns {Array} */ masterComponents: function () { - return this.get('componentsForFilter').filterProperty('isMaster', true); - }.property('componentsForFilter'), + var components = App.MasterComponent.find().rejectProperty('totalCount', 0); + components.setEach('checkedForHostFilter', false); + return components; + }.property('App.router.clusterController.isComponentsStateLoaded'), /** * Slave components * @returns {Array} */ slaveComponents: function () { - return this.get('componentsForFilter').filterProperty('isSlave', true); - }.property('componentsForFilter'), + var components = App.SlaveComponent.find().rejectProperty('totalCount', 0); + components.setEach('checkedForHostFilter', false); + return components; + }.property('App.router.clusterController.isComponentsStateLoaded'), /** * Client components * @returns {Array} */ clientComponents: function () { - return this.get('componentsForFilter').filterProperty('isClient', true); - }.property('componentsForFilter'), + var components = App.ClientComponent.find().rejectProperty('totalCount', 0); + components.setEach('checkedForHostFilter', false); + return components; + }.property('App.router.clusterController.isComponentsStateLoaded'), /** * Checkbox for quick selecting/deselecting of master components