Преглед на файлове

AMBARI-6677 Addable and deletable components should be derived from cardinality field. (Buzhor Denys via ababiichuk)

aBabiichuk преди 10 години
родител
ревизия
7830b3fe2c
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      ambari-web/app/models/stack_service_component.js

+ 3 - 2
ambari-web/app/models/stack_service_component.js

@@ -104,12 +104,13 @@ 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('isHAComponentOnly'));
+    return ((this.get('isMasterAddableInstallerWizard') || (this.get('isSlave') && this.get('maxToInstall') > 2) || this.get('isClient')) && !this.get('isHAComponentOnly'));
   }.property('componentName'),
 
   /** @property {Boolean} isDeletable - component supports delete action **/
   isDeletable: function() {
-    return this.get('isAddableToHost');
+    var ignored = ['HBASE_MASTER'];
+    return this.get('isAddableToHost') && !ignored.contains(this.get('componentName'));
   }.property('componentName'),
 
   /** @property {Boolean} isShownOnInstallerAssignMasterPage - component visible on "Assign Masters" step of Install Wizard **/