Repository: ambari Updated Branches: refs/heads/branch-2.4 e4dcce6bc -> 129d965d7
AMBARI-17498 "% of cluster capacity" continues to show as visible when we DISCARD the the calculated LLAp configs after HSI enabled. (atkach) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/129d965d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/129d965d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/129d965d Branch: refs/heads/branch-2.4 Commit: 129d965d7045961a32f1e2df2fcd870a012fa3ce Parents: e4dcce6 Author: Andrii Tkach <[email protected]> Authored: Thu Jun 30 14:50:00 2016 +0300 Committer: Andrii Tkach <[email protected]> Committed: Thu Jun 30 15:52:56 2016 +0300 ---------------------------------------------------------------------- ambari-web/app/controllers/main/service/info/configs.js | 1 + ambari-web/test/controllers/main/service/info/config_test.js | 3 +++ 2 files changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/129d965d/ambari-web/app/controllers/main/service/info/configs.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/main/service/info/configs.js b/ambari-web/app/controllers/main/service/info/configs.js index e1afd5e..bc91b72 100644 --- a/ambari-web/app/controllers/main/service/info/configs.js +++ b/ambari-web/app/controllers/main/service/info/configs.js @@ -635,6 +635,7 @@ App.MainServiceInfoConfigsController = Em.Controller.extend(App.AddSecurityConfi doCancel: function () { this.set('preSelectedConfigVersion', null); this.clearAllRecommendations(); + this.clearRecommendationsInfo(); this.loadSelectedVersion(this.get('selectedVersion'), this.get('selectedConfigGroup')); }, http://git-wip-us.apache.org/repos/asf/ambari/blob/129d965d/ambari-web/test/controllers/main/service/info/config_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/main/service/info/config_test.js b/ambari-web/test/controllers/main/service/info/config_test.js index b533054..1c8cbfd 100644 --- a/ambari-web/test/controllers/main/service/info/config_test.js +++ b/ambari-web/test/controllers/main/service/info/config_test.js @@ -406,9 +406,11 @@ describe("App.MainServiceInfoConfigsController", function () { describe("#doCancel", function () { beforeEach(function () { sinon.stub(Em.run, 'once', Em.K); + sinon.stub(mainServiceInfoConfigsController, 'clearRecommendationsInfo'); }); afterEach(function () { Em.run.once.restore(); + mainServiceInfoConfigsController.clearRecommendationsInfo.restore(); }); it("should clear dependent configs", function() { @@ -416,6 +418,7 @@ describe("App.MainServiceInfoConfigsController", function () { mainServiceInfoConfigsController.set('recommendations', Em.A([{name: 'prop_1'}])); mainServiceInfoConfigsController.doCancel(); expect(App.isEmptyObject(mainServiceInfoConfigsController.get('recommendations'))).to.be.true; + expect(mainServiceInfoConfigsController.clearRecommendationsInfo.calledOnce).to.be.true; }); });
