You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2015/03/03 15:20:54 UTC

ambari git commit: AMBARI-9887 400-node cluster: Hosts page become unresponsive. (atkach) (cherry picked from commit d27807b)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.0.0 9aacacbd1 -> 62f1e7510


AMBARI-9887 400-node cluster: Hosts page become unresponsive. (atkach)
(cherry picked from commit d27807b)


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

Branch: refs/heads/branch-2.0.0
Commit: 62f1e75107b345949b0b2e840176b78bd1cc2acf
Parents: 9aacacb
Author: Andrii Tkach <at...@hortonworks.com>
Authored: Tue Mar 3 13:24:01 2015 +0200
Committer: Andrii Tkach <at...@hortonworks.com>
Committed: Tue Mar 3 16:20:42 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/62f1e751/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/62f1e751/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 c7b7e56..3558550 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);