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 2014/04/01 17:36:54 UTC

git commit: AMBARI-5301 Table of Confirm Hosts step is collapsed. (atkach)

Repository: ambari
Updated Branches:
  refs/heads/trunk 0a702395e -> 0efe870da


AMBARI-5301 Table of Confirm Hosts step is collapsed. (atkach)


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

Branch: refs/heads/trunk
Commit: 0efe870dabb2760ce4acd69fdcd5c05e422dc928
Parents: 0a70239
Author: atkach <at...@hortonworks.com>
Authored: Tue Apr 1 18:34:52 2014 +0300
Committer: atkach <at...@hortonworks.com>
Committed: Tue Apr 1 18:34:52 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/views/wizard/step3_view.js | 19 ++++++++------
 ambari-web/app/views/wizard/step9_view.js | 36 ++++++++++++++------------
 2 files changed, 31 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0efe870d/ambari-web/app/views/wizard/step3_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step3_view.js b/ambari-web/app/views/wizard/step3_view.js
index 4075515..278f8dc 100644
--- a/ambari-web/app/views/wizard/step3_view.js
+++ b/ambari-web/app/views/wizard/step3_view.js
@@ -145,14 +145,17 @@ App.WizardStep3View = App.TableView.extend({
    * filter hosts by category
    */
   filter: function () {
-    var result = [];
-    var selectedCategory = this.get('selectedCategory');
-    if (!selectedCategory || selectedCategory.get('hostsBootStatus') === 'ALL') {
-      result = this.get('content');
-    } else {
-      result = this.get('content').filterProperty('bootStatus', this.get('selectedCategory.hostsBootStatus'));
-    }
-    this.set('filteredContent', result);
+    var self = this;
+    Em.run.next(function () {
+      var result = [];
+      var selectedCategory = self.get('selectedCategory');
+      if (!selectedCategory || selectedCategory.get('hostsBootStatus') === 'ALL') {
+        result = self.get('content');
+      } else {
+        result = self.get('content').filterProperty('bootStatus', self.get('selectedCategory.hostsBootStatus'));
+      }
+      self.set('filteredContent', result);
+    });
   }.observes('selectedCategory'),
   /**
    * Trigger on Category click

http://git-wip-us.apache.org/repos/asf/ambari/blob/0efe870d/ambari-web/app/views/wizard/step9_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step9_view.js b/ambari-web/app/views/wizard/step9_view.js
index d55cb12..5897665 100644
--- a/ambari-web/app/views/wizard/step9_view.js
+++ b/ambari-web/app/views/wizard/step9_view.js
@@ -112,22 +112,26 @@ App.WizardStep9View = App.TableView.extend({
    * filter hosts by category
    */
   filter: function () {
-    var result = [];
-    var selectedCategory = this.get('selectedCategory');
-    if (!selectedCategory || selectedCategory.get('hostStatus') === 'all') {
-      result = this.get('content');
-    } else if (selectedCategory.get('hostStatus') == 'inProgress') {
-      result = this.get('content').filter(function (_host) {
-        return (_host.get('status') == 'info' || _host.get('status') == 'pending' || _host.get('status') == 'in_progress');
-      });
-    } else if (selectedCategory.get('hostStatus') == 'failed') {
-      result = this.get('content').filter(function (_host) {
-        return (_host.get('status') == 'failed' || _host.get('status') == 'heartbeat_lost');
-      });
-    } else {
-      result = this.get('content').filterProperty('status', selectedCategory.get('hostStatus'));
-    }
-    this.set('filteredContent', result);
+    var self = this;
+    Em.run.next(function () {
+      var result = [];
+      var content = self.get('content');
+      var selectedCategory = self.get('selectedCategory');
+      if (!selectedCategory || selectedCategory.get('hostStatus') === 'all') {
+        result = content;
+      } else if (selectedCategory.get('hostStatus') == 'inProgress') {
+        result = content.filter(function (_host) {
+          return (_host.get('status') == 'info' || _host.get('status') == 'pending' || _host.get('status') == 'in_progress');
+        });
+      } else if (selectedCategory.get('hostStatus') == 'failed') {
+        result = content.filter(function (_host) {
+          return (_host.get('status') == 'failed' || _host.get('status') == 'heartbeat_lost');
+        });
+      } else {
+        result = content.filterProperty('status', selectedCategory.get('hostStatus'));
+      }
+      self.set('filteredContent', result);
+    });
   }.observes('selectedCategory'),
   /**
    * Trigger on Category click