|
@@ -97,7 +97,7 @@ App.StackServiceComponent = DS.Model.extend({
|
|
|
|
|
|
/** @property {Boolean} isAddableToHost - component can be added on host details page **/
|
|
|
isAddableToHost: function() {
|
|
|
- return ((this.get('isMasterAddableInstallerWizard') || (this.get('isSlave') && this.get('maxToInstall') > 2) || this.get('isClient')) && !this.get('isHAComponentOnly'));
|
|
|
+ return this.get('isMasterAddableInstallerWizard') || ((this.get('isNotAddableOnlyInInstall') || this.get('isSlave') || this.get('isClient')) && !this.get('isHAComponentOnly'));
|
|
|
}.property('componentName'),
|
|
|
|
|
|
/** @property {Boolean} isDeletable - component supports delete action **/
|
|
@@ -142,7 +142,7 @@ App.StackServiceComponent = DS.Model.extend({
|
|
|
* @property {Boolean} isMasterAddableInstallerWizard
|
|
|
**/
|
|
|
isMasterAddableInstallerWizard: function() {
|
|
|
- return this.get('isMaster') && this.get('isMultipleAllowed') && this.get('maxToInstall') > 1 && !this.get('isMasterAddableOnlyOnHA').contains(this.get('componentName'));
|
|
|
+ return this.get('isMaster') && this.get('isMultipleAllowed') && !this.get('isMasterAddableOnlyOnHA') && !this.get('isNotAddableOnlyInInstall');
|
|
|
}.property('componentName'),
|
|
|
|
|
|
/**
|
|
@@ -150,7 +150,9 @@ App.StackServiceComponent = DS.Model.extend({
|
|
|
* New instances of these components are added in appropriate HA wizards
|
|
|
* @property {Boolean} isMasterAddableOnlyOnHA
|
|
|
*/
|
|
|
- isMasterAddableOnlyOnHA: ['NAMENODE', 'RESOURCEMANAGER', 'HIVE_METASTORE', 'HIVE_SERVER', 'RANGER_ADMIN'],
|
|
|
+ isMasterAddableOnlyOnHA: function () {
|
|
|
+ return ['NAMENODE', 'RESOURCEMANAGER', 'RANGER_ADMIN'].contains(this.get('componentName'));
|
|
|
+ }.property('componentName'),
|
|
|
|
|
|
/** @property {Boolean} isHAComponentOnly - Components that can be installed only if HA enabled **/
|
|
|
isHAComponentOnly: function() {
|
|
@@ -193,10 +195,9 @@ App.StackServiceComponent = DS.Model.extend({
|
|
|
return !!App.StackServiceComponent.coHost[componentName];
|
|
|
}.property('componentName'),
|
|
|
|
|
|
- /** @property {Boolean} showAddBtnInInstall - show add button for this component on Assign Masters **/
|
|
|
- showAddBtnInInstall: function() {
|
|
|
- var doNotShowList = ['HIVE_METASTORE', 'HIVE_SERVER'];
|
|
|
- return !doNotShowList.contains(this.get('componentName'));
|
|
|
+ /** @property {Boolean} isNotAddableOnlyInInstall - is this component addable, except Install and Add Service Wizards **/
|
|
|
+ isNotAddableOnlyInInstall: function() {
|
|
|
+ return ['HIVE_METASTORE', 'HIVE_SERVER', 'RANGER_KMS_SERVER'].contains(this.get('componentName'));
|
|
|
}.property('componentName')
|
|
|
|
|
|
});
|