Repository: ambari Updated Branches: refs/heads/branch-2.4 2cd91226c -> 8bf1a0b0b
AMBARI-18766. Add Service failed when none of the host components report version. (jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8bf1a0b0 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8bf1a0b0 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8bf1a0b0 Branch: refs/heads/branch-2.4 Commit: 8bf1a0b0bc745cc1f4bcb4c115f4cb17d2ea0c5c Parents: 2cd9122 Author: Jaimin Jetly <[email protected]> Authored: Wed Nov 2 20:36:03 2016 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Wed Nov 2 20:38:08 2016 -0700 ---------------------------------------------------------------------- ambari-web/app/controllers/wizard/step8_controller.js | 2 +- ambari-web/test/controllers/wizard/step8_test.js | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8bf1a0b0/ambari-web/app/controllers/wizard/step8_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step8_controller.js b/ambari-web/app/controllers/wizard/step8_controller.js index 644885b..237e2d8 100644 --- a/ambari-web/app/controllers/wizard/step8_controller.js +++ b/ambari-web/app/controllers/wizard/step8_controller.js @@ -329,7 +329,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, App.wiz */ loadRepoInfo: function () { - var currentRepoVersion = App.StackVersion.find().findProperty('state', 'CURRENT').get('repositoryVersion.repositoryVersion'); + var currentRepoVersion = App.get('currentStackVersionNumber'); var stackName = App.get('currentStackName'); return App.ajax.send({ http://git-wip-us.apache.org/repos/asf/ambari/blob/8bf1a0b0/ambari-web/test/controllers/wizard/step8_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/wizard/step8_test.js b/ambari-web/test/controllers/wizard/step8_test.js index 217900f..3abe2cb 100644 --- a/ambari-web/test/controllers/wizard/step8_test.js +++ b/ambari-web/test/controllers/wizard/step8_test.js @@ -637,17 +637,13 @@ describe('App.WizardStep8Controller', function () { describe('#loadRepoInfo', function() { beforeEach(function () { - sinon.stub(App, 'get').withArgs('currentStackName').returns('HDP'); - sinon.stub(App.StackVersion, 'find', function() { - return [ - Em.Object.create({state: 'CURRENT', repositoryVersion: {repositoryVersion: '2.3.0.0-2208'}}) - ]; - }); + var stubForGet = sinon.stub(App, 'get'); + stubForGet.withArgs('currentStackName').returns('HDP'); + stubForGet.withArgs('currentStackVersionNumber').returns('2.3.0.0-2208'); }); afterEach(function () { App.get.restore(); - App.StackVersion.find.restore(); }); it('should use current StackVersion', function() { installerStep8Controller.loadRepoInfo();
