diff --git a/ambari-web/app/models/stack_service_component.js b/ambari-web/app/models/stack_service_component.js index efd473ef3e4..ecbe4941515 100644 --- a/ambari-web/app/models/stack_service_component.js +++ b/ambari-web/app/models/stack_service_component.js @@ -155,8 +155,8 @@ App.StackServiceComponent = DS.Model.extend({ /** @property {Boolean} isAddableToHost - component can be added on host details page **/ isAddableToHost: function() { - return this.get('isMasterAddableInstallerWizard') - || ((this.get('isNotAddableOnlyInInstall') || this.get('isSlave') || this.get('isClient')) + return (this.get('isMaster') && !this.get('isMasterAddableOnlyOnHA')) + || ((this.get('isSlave') || this.get('isClient')) && (!this.get('isHAComponentOnly') || (App.get('isHaEnabled') && this.get('componentName') === 'JOURNALNODE'))); }.property('componentName'), diff --git a/ambari-web/test/models/stack_service_component_test.js b/ambari-web/test/models/stack_service_component_test.js index 69613e24800..5aae86da0cc 100644 --- a/ambari-web/test/models/stack_service_component_test.js +++ b/ambari-web/test/models/stack_service_component_test.js @@ -121,11 +121,11 @@ var componentPropertiesValidationTests = [ isMaster: true, isRestartable: true, isReassignable: true, - isDeletable: false, + isDeletable: true, isRollinRestartAllowed: false, isDecommissionAllowed: false, isRefreshConfigsAllowed: false, - isAddableToHost: false, + isAddableToHost: true, isShownOnInstallerAssignMasterPage: true, isShownOnInstallerSlaveClientPage: false, isShownOnAddServiceAssignMasterPage: true,