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

git commit: AMBARI-3443. "Assign Slaves and Clients" step. "all | none" click error. (onechiporenko)

Updated Branches:
  refs/heads/trunk dd330b8b7 -> 7e538964c


AMBARI-3443. "Assign Slaves and Clients" step. "all | none" click error. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 7e538964cda7103f62b95aef6f869c4372e4d1ae
Parents: dd330b8
Author: Oleg Nechiporenko <cv...@yahoo.com>
Authored: Thu Oct 3 13:40:04 2013 +0300
Committer: Oleg Nechiporenko <cv...@yahoo.com>
Committed: Thu Oct 3 13:40:04 2013 +0300

----------------------------------------------------------------------
 ambari-web/app/controllers/wizard/step6_controller.js       | 7 +++----
 .../controllers/main/service/reassign_controller_test.js    | 2 +-
 ambari-web/test/installer/step6_test.js                     | 5 ++++-
 ambari-web/test/mappers/status_mapper_test.js               | 9 ++++++---
 4 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7e538964/ambari-web/app/controllers/wizard/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js b/ambari-web/app/controllers/wizard/step6_controller.js
index a0279de..8880af8 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -132,7 +132,7 @@ App.WizardStep6Controller = Em.Controller.extend({
    */
   setAllNodes: function (label, checked) {
     this.get('hosts').forEach(function (host) {
-      host.get('checkboxes').forEach(function (checkbox) {
+      host.get('checkboxes').filterProperty('isInstalled', false).forEach(function (checkbox) {
         if (checkbox.get('title') === label) {
           checkbox.set('checked', checked);
         }
@@ -161,7 +161,7 @@ App.WizardStep6Controller = Em.Controller.extend({
     var allTrue = true;
     var allFalse = true;
     hosts.forEach(function (host) {
-      host.get('checkboxes').forEach(function (cb) {
+      host.get('checkboxes').filterProperty('isInstalled', false).forEach(function (cb) {
         if (cb.get('title') === title) {
           allTrue &= cb.get('checked');
           allFalse &= !cb.get('checked');
@@ -464,5 +464,4 @@ App.WizardStep6Controller = Em.Controller.extend({
     return !isError;
   }
 
-})
-;
+});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7e538964/ambari-web/test/controllers/main/service/reassign_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/service/reassign_controller_test.js b/ambari-web/test/controllers/main/service/reassign_controller_test.js
index ce14c00..3d3401b 100644
--- a/ambari-web/test/controllers/main/service/reassign_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign_controller_test.js
@@ -27,7 +27,7 @@ describe('App.ReassignMasterController', function () {
 
   describe('#totalSteps', function () {
     it('check', function () {
-      expect(reassignMasterController.get('totalSteps')).to.equal(4);
+      expect(reassignMasterController.get('totalSteps')).to.equal(6);
     });
   });
 

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7e538964/ambari-web/test/installer/step6_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/installer/step6_test.js b/ambari-web/test/installer/step6_test.js
index 7ee7e23..b515b44 100644
--- a/ambari-web/test/installer/step6_test.js
+++ b/ambari-web/test/installer/step6_test.js
@@ -137,7 +137,10 @@ describe('App.WizardStep6Controller', function () {
         controller.setAllNodes(test.title, test.state);
         var hosts = controller.get('hosts');
         hosts.forEach(function(host) {
-          expect(host.get('checkboxes').findProperty('title', test.title).get('checked')).to.equal(test.state);
+          var cb = host.get('checkboxes').filterProperty('isInstalled', false).findProperty('title', test.title);
+          if (cb) {
+            expect(cb.get('checked')).to.equal(test.state);
+          }
         });
       });
     });

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/7e538964/ambari-web/test/mappers/status_mapper_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/mappers/status_mapper_test.js b/ambari-web/test/mappers/status_mapper_test.js
index 93bf534..f07757c 100644
--- a/ambari-web/test/mappers/status_mapper_test.js
+++ b/ambari-web/test/mappers/status_mapper_test.js
@@ -34,7 +34,8 @@ describe('App.statusMapper', function () {
                 {
                   HostRoles : {
                     component_name: "OOZIE_CLIENT",
-                    host_name: "ip-10-40-35-199.ec2.internal"
+                    host_name: "ip-10-40-35-199.ec2.internal",
+                    state: "STATE"
                   }
                 }
               ]
@@ -44,9 +45,11 @@ describe('App.statusMapper', function () {
       ]
     };
     var result = App.statusMapper.parse_host_components(test_data);
-    var e = 'OOZIE_CLIENT_ip-10-40-35-199.ec2.internal';
+    var k = 'OOZIE_CLIENT_ip-10-40-35-199.ec2.internal';
+    var e = 'STATE';
+    console.log(result);
     it('get host_component id', function() {
-      expect(result[e].id).to.equal(e);
+      expect(result[k].work_status).to.equal(e);
     });
   });