Repository: ambari Updated Branches: refs/heads/trunk 8eb03cd57 -> 1b06cd40c
AMBARI-15683. Background Operations window opening with avoid opening checkbox set (onechiporenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b06cd40 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b06cd40 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b06cd40 Branch: refs/heads/trunk Commit: 1b06cd40c6ed34a02e94355c2cf35367c5caa9f1 Parents: 8eb03cd Author: Oleg Nechiporenko <[email protected]> Authored: Mon Apr 4 15:01:19 2016 +0300 Committer: Oleg Nechiporenko <[email protected]> Committed: Mon Apr 4 15:53:55 2016 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/host/details.js | 6 +++- .../test/controllers/main/host/details_test.js | 34 -------------------- 2 files changed, 5 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06cd40/ambari-web/app/controllers/main/host/details.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/host/details.js b/ambari-web/app/controllers/main/host/details.js index fd73510..b2569d2 100644 --- a/ambari-web/app/controllers/main/host/details.js +++ b/ambari-web/app/controllers/main/host/details.js @@ -2476,7 +2476,11 @@ App.MainHostDetailsController = Em.Controller.extend(App.SupportClientConfigsDow executeCustomCommandSuccessCallback : function(data, ajaxOptions, params) { if (data.Requests.id) { - App.router.get('backgroundOperationsController').showPopup(); + App.router.get('userSettingsController').dataLoading('show_bg').done(function (initValue) { + if (initValue) { + App.router.get('backgroundOperationsController').showPopup(); + } + }); } }, executeCustomCommandErrorCallback : function(data) { http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06cd40/ambari-web/test/controllers/main/host/details_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/host/details_test.js b/ambari-web/test/controllers/main/host/details_test.js index 4f6b039..93f07cf 100644 --- a/ambari-web/test/controllers/main/host/details_test.js +++ b/ambari-web/test/controllers/main/host/details_test.js @@ -2942,40 +2942,6 @@ describe('App.MainHostDetailsController', function () { }); }); - describe("#executeCustomCommandSuccessCallback()", function () { - - var data; - var mock; - - beforeEach(function () { - data = { - Requests: { - id: 1 - } - }; - mock = { - showPopup: Em.K - }; - sinon.stub(App.router, 'get').returns(mock); - sinon.spy(mock, 'showPopup'); - controller.executeCustomCommandSuccessCallback(data, {}, {}); - }); - - afterEach(function () { - App.router.get.restore(); - mock.showPopup.restore(); - }); - - it('App.router.get is called with `backgroundOperationsController`', function () { - expect(App.router.get.calledWith('backgroundOperationsController')).to.be.true; - }); - - it('showPopup is called once', function () { - expect(mock.showPopup.calledOnce).to.be.true; - }); - - }); - describe("#executeCustomCommandErrorCallback()", function () { beforeEach(function () { sinon.stub($, 'parseJSON');
