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-12523. Incorrect ZooKeeper Server dropdown behaviour on step 5 of installer (akovalenko)
Date Fri, 24 Jul 2015 11:22:40 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk a49c214ad -> e58c811b6


AMBARI-12523. Incorrect ZooKeeper Server dropdown behaviour on step 5 of installer (akovalenko)


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

Branch: refs/heads/trunk
Commit: e58c811b65dc5a08099779d84558e7ce52dc37b3
Parents: a49c214
Author: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Authored: Fri Jul 24 14:14:08 2015 +0300
Committer: Aleksandr Kovalenko <akovalenko@hortonworks.com>
Committed: Fri Jul 24 14:14:08 2015 +0300

----------------------------------------------------------------------
 ambari-web/app/mixins/wizard/assign_master_components.js | 10 ++++++++--
 ambari-web/test/controllers/wizard/step5_test.js         |  6 ++++++
 2 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e58c811b/ambari-web/app/mixins/wizard/assign_master_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js b/ambari-web/app/mixins/wizard/assign_master_components.js
index 9f6b477..db81b03 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1016,7 +1016,10 @@ App.AssignMasterComponents = Em.Mixin.create({
 
       this.get("selectedServicesMasters").insertAt(this.get("selectedServicesMasters").indexOf(lastMaster)
+ 1, newMaster);
 
-      this.set('componentToRebalance', componentName);
+      this.setProperties({
+        componentToRebalance: componentName,
+        lastChangedComponent: componentName
+      });
       this.incrementProperty('rebalanceComponentHostsCounter');
       this.toggleProperty('hostNameCheckTrigger');
       return true;
@@ -1050,7 +1053,10 @@ App.AssignMasterComponents = Em.Mixin.create({
       currentMasters.set("lastObject.showRemoveControl", false);
     }
 
-    this.set('componentToRebalance', componentName);
+    this.setProperties({
+      componentToRebalance: componentName,
+      lastChangedComponent: componentName
+    });
     this.incrementProperty('rebalanceComponentHostsCounter');
     this.toggleProperty('hostNameCheckTrigger');
     return true;

http://git-wip-us.apache.org/repos/asf/ambari/blob/e58c811b/ambari-web/test/controllers/wizard/step5_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step5_test.js b/ambari-web/test/controllers/wizard/step5_test.js
index b5e0ddb..6f2e0e1 100644
--- a/ambari-web/test/controllers/wizard/step5_test.js
+++ b/ambari-web/test/controllers/wizard/step5_test.js
@@ -535,6 +535,8 @@ describe('App.WizardStep5Controller', function () {
         if (test.e) {
           expect(c.get('selectedServicesMasters.lastObject.showRemoveControl')).to.equal(test.showRemoveControl);
           expect(c.get('selectedServicesMasters.lastObject.showAddControl')).to.equal(test.showAddControl);
+          expect(c.get('componentToRebalance')).to.equal(test.componentName);
+          expect(c.get('lastChangedComponent')).to.equal(test.componentName);
         }
       })
     });
@@ -585,6 +587,10 @@ describe('App.WizardStep5Controller', function () {
         c.set('selectedServicesMasters', test.selectedServicesMasters);
         c.set('hosts', test.hosts);
         expect(c.addComponent(test.componentName)).to.equal(test.e);
+        if (test.e) {
+          expect(c.get('componentToRebalance')).to.equal(test.componentName);
+          expect(c.get('lastChangedComponent')).to.equal(test.componentName);
+        }
       });
     });
   });


Mime
View raw message