You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2015/08/13 17:15:48 UTC

ambari git commit: AMBARI-12762. FE: Uninstalled components in Host->Filter by component (akovalenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk c8508e82b -> ac1e5f6d4


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/ac1e5f6d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ac1e5f6d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ac1e5f6d

Branch: refs/heads/trunk
Commit: ac1e5f6d4006c8ca6c56d9e5c51e2e46cc14898f
Parents: c8508e8
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Thu Aug 13 17:51:04 2015 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Thu Aug 13 17:51:04 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/ac1e5f6d/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/ac1e5f6d/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