Repository: ambari
Updated Branches:
  refs/heads/trunk 087b990aa -> c313023bd


AMBARI-9887 400-node cluster: Hosts page become unresponsive. (atkach)


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

Branch: refs/heads/trunk
Commit: d27807b145d2d6c58eb5b1b7ed23e60b172ff119
Parents: 087b990
Author: Andrii Tkach <atk...@hortonworks.com>
Authored: Tue Mar 3 13:24:01 2015 +0200
Committer: Andrii Tkach <atk...@hortonworks.com>
Committed: Tue Mar 3 16:19:11 2015 +0200

----------------------------------------------------------------------
 ambari-web/app/mappers/hosts_mapper.js |  2 ++
 ambari-web/app/views/main/host.js      | 12 +-----------
 2 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d27807b1/ambari-web/app/mappers/hosts_mapper.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mappers/hosts_mapper.js 
b/ambari-web/app/mappers/hosts_mapper.js
index 9013d12..5af2dae 100644
--- a/ambari-web/app/mappers/hosts_mapper.js
+++ b/ambari-web/app/mappers/hosts_mapper.js
@@ -88,6 +88,7 @@ App.hostsMapper = App.QuickDataMapper.create({
       var cacheServices = App.cache['services'];
       var loadedServiceComponentsMap = 
App.get('componentConfigMapper').buildServiceComponentMap(cacheServices);
       var serviceToHostComponentIdMap = {};
+      var selectedHosts = App.db.getSelectedHosts('mainHostController');
 
       json.items.forEach(function (item, index) {
         item.host_components = item.host_components || [];
@@ -130,6 +131,7 @@ App.hostsMapper = App.QuickDataMapper.create({
         }
         var parsedItem = this.parseIt(item, this.config);
         parsedItem.is_requested = true;
+        parsedItem.selected = selectedHosts.contains(parsedItem.host_name);
 
         hostIds[item.Hosts.host_name] = parsedItem;
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/d27807b1/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 7f49486..fd91cf8 100644
--- a/ambari-web/app/views/main/host.js
+++ b/ambari-web/app/views/main/host.js
@@ -52,17 +52,7 @@ App.MainHostView = 
App.TableView.extend(App.TableServerViewMixin, {
    * List of hosts in cluster
    * @type {Array}
    */
-  content: function () {
-    var controllerName = this.get('controller.name');
-    var selectedHosts = App.db.getSelectedHosts(controllerName);
-    if (this.get('controller')) {
-      return this.get('controller.content').filter(function (host) {
-        host.set('selected', selectedHosts.contains(host.get('hostName')));
-        return true;
-      });
-    }
-    return [];
-  }.property('controller.content'),
+  contentBinding: 'controller.content',
 
   onRequestErrorHandler: function() {
     this.set('requestError', null);

Reply via email to