AMBARI-21826. Install button showing wrong list of services to install 
(alexantonenko)


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

Branch: refs/heads/feature-branch-AMBARI-21307
Commit: 91155b152625cafb296b62961cf70c6f3fb6d72c
Parents: 0bd85d7
Author: Alex Antonenko <aantone...@hortonworks.com>
Authored: Mon Aug 28 17:11:31 2017 +0300
Committer: Alex Antonenko <aantone...@hortonworks.com>
Committed: Mon Aug 28 17:11:31 2017 +0300

----------------------------------------------------------------------
 .../app/controllers/main/admin/stack_and_upgrade_controller.js     | 2 +-
 .../controllers/main/service/reassign/step1_controller_test.js     | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/91155b15/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js 
b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
index f02c5f3..beaff0e 100644
--- a/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
+++ b/ambari-web/app/controllers/main/admin/stack_and_upgrade_controller.js
@@ -1501,7 +1501,7 @@ App.MainAdminStackAndUpgradeController = 
Em.Controller.extend(App.LocalStorage,
       ? Em.I18n.t('admin.stackVersions.version.install.patch.confirm')
       : Em.I18n.t('admin.stackVersions.version.install.confirm');
     var availableServices = repo.get('stackServices').filter(function(service) 
{
-      return App.Service.find(service.get('name')).get('isLoaded') && 
service.get('isAvailable');
+      return App.Service.find(service.get('name')).get('isLoaded') && 
service.get('isAvailable') && service.get('isUpgradable');
     }, this);
     return App.ModalPopup.show({
       header: Em.I18n.t('popup.confirmation.commonHeader'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/91155b15/ambari-web/test/controllers/main/service/reassign/step1_controller_test.js
----------------------------------------------------------------------
diff --git 
a/ambari-web/test/controllers/main/service/reassign/step1_controller_test.js 
b/ambari-web/test/controllers/main/service/reassign/step1_controller_test.js
index 7dbf24a..1a020a0 100644
--- a/ambari-web/test/controllers/main/service/reassign/step1_controller_test.js
+++ b/ambari-web/test/controllers/main/service/reassign/step1_controller_test.js
@@ -112,6 +112,7 @@ describe('App.ReassignMasterWizardStep1Controller', 
function () {
       sinon.stub(controller, 'saveDatabaseType', Em.K);
       sinon.stub(controller, 'saveServiceProperties', Em.K);
       sinon.stub(controller, 'saveConfigs', Em.K);
+      sinon.stub(controller, 'isExistingDb');
 
       reassignCtrl = App.router.reassignMasterController;
       reassignCtrl.set('content.hasManualSteps', true);
@@ -122,6 +123,7 @@ describe('App.ReassignMasterWizardStep1Controller', 
function () {
       controller.saveDatabaseType.restore();
       controller.saveServiceProperties.restore();
       controller.saveConfigs.restore();
+      controller.isExistingDb.restore();
     });
   
     it('should not set hasManualSteps to false for oozie with derby db', 
function() {

Reply via email to