ソースを参照

AMBARI-16015 Popup for selecting Hive Interactive host does not work after re-enabling the Interactive Query toggle. (ababiichuk)

ababiichuk 9 年 前
コミット
8a20810b20

+ 1 - 0
ambari-web/app/controllers/wizard/step7/assign_master_controller.js

@@ -241,6 +241,7 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
   saveMasterComponentHosts: function() {
   saveMasterComponentHosts: function() {
     var controller = App.router.get(this.get('content.controllerName'));
     var controller = App.router.get(this.get('content.controllerName'));
     controller.saveMasterComponentHosts(this);
     controller.saveMasterComponentHosts(this);
+    controller.loadMasterComponentHosts();
   },
   },
 
 
   /**
   /**

+ 7 - 0
ambari-web/test/controllers/wizard/step7/assign_master_controller_test.js

@@ -318,6 +318,7 @@ describe('App.AssignMasterOnStep7Controller', function () {
       },
       },
       mock = {
       mock = {
         saveMasterComponentHosts: Em.K,
         saveMasterComponentHosts: Em.K,
+        loadMasterComponentHosts: Em.K,
         setDBProperty: Em.K
         setDBProperty: Em.K
       },
       },
       config = Em.Object.create({
       config = Em.Object.create({
@@ -329,6 +330,7 @@ describe('App.AssignMasterOnStep7Controller', function () {
       sinon.stub(popup, 'hide');
       sinon.stub(popup, 'hide');
       sinon.stub(App.router, 'get').returns(mock);
       sinon.stub(App.router, 'get').returns(mock);
       sinon.stub(mock, 'saveMasterComponentHosts');
       sinon.stub(mock, 'saveMasterComponentHosts');
+      sinon.stub(mock, 'loadMasterComponentHosts');
       sinon.stub(mock, 'setDBProperty');
       sinon.stub(mock, 'setDBProperty');
       view.reopen({
       view.reopen({
         content: Em.Object.create({
         content: Em.Object.create({
@@ -373,6 +375,7 @@ describe('App.AssignMasterOnStep7Controller', function () {
       App.router.get.restore();
       App.router.get.restore();
       popup.hide.restore();
       popup.hide.restore();
       mock.saveMasterComponentHosts.restore();
       mock.saveMasterComponentHosts.restore();
+      mock.loadMasterComponentHosts.restore();
       mock.setDBProperty.restore();
       mock.setDBProperty.restore();
     });
     });
 
 
@@ -380,6 +383,10 @@ describe('App.AssignMasterOnStep7Controller', function () {
       expect(mock.saveMasterComponentHosts.calledOnce).to.be.true;
       expect(mock.saveMasterComponentHosts.calledOnce).to.be.true;
     });
     });
 
 
+    it("saveMasterComponentHosts should be called", function() {
+      expect(mock.loadMasterComponentHosts.calledOnce).to.be.true;
+    });
+
     it("configActionComponent should be set", function() {
     it("configActionComponent should be set", function() {
       expect(view.get('configWidgetContext.config.configActionComponent')).to.be.eql({
       expect(view.get('configWidgetContext.config.configActionComponent')).to.be.eql({
         componentName: 'C1',
         componentName: 'C1',