Browse Source

AMBARI-16253 It is possible to change other component selection when selecting HSI.(ababiichuk)

ababiichuk 9 years ago
parent
commit
3bd507eca5

+ 16 - 0
ambari-web/app/controllers/wizard/step7/assign_master_controller.js

@@ -71,6 +71,22 @@ App.AssignMasterOnStep7Controller = Em.Controller.extend(App.BlueprintMixin, App
     }
     }
   },
   },
 
 
+  /**
+   * Used to set showAddControl/showRemoveControl flag
+   * @param componentName
+   * @override
+   */
+  updateComponent: function(componentName) {
+    this._super(componentName);
+
+    if (!this.get('mastersToCreate').contains(componentName)) {
+      this.get("selectedServicesMasters").filterProperty("component_name", componentName).forEach(function(c) {
+        c.set('showAddControl', false);
+        c.set('showRemoveControl', false);
+      });
+    }
+  },
+
   /**
   /**
    * Assign Master page will be displayed in the popup
    * Assign Master page will be displayed in the popup
    * @private
    * @private