ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akovale...@apache.org
Subject ambari git commit: AMBARI-12762. FE: Uninstalled components in Host->Filter by component (akovalenko)
Date Thu, 13 Aug 2015 15:18:48 GMT
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 <akovalenko@hortonworks.com>
Authored: Thu Aug 13 18:18:30 2015 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
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


Mime
View raw message