Repository: ambari Updated Branches: refs/heads/trunk 4b2de80ba -> 3bd507eca
AMBARI-16253 It is possible to change other component selection when selecting HSI.(ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3bd507ec Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3bd507ec Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3bd507ec Branch: refs/heads/trunk Commit: 3bd507eca5475d59b827088f7be78f1c9971c1f5 Parents: 4b2de80 Author: ababiichuk <[email protected]> Authored: Wed May 4 17:30:40 2016 +0300 Committer: ababiichuk <[email protected]> Committed: Wed May 4 18:22:31 2016 +0300 ---------------------------------------------------------------------- .../wizard/step7/assign_master_controller.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/3bd507ec/ambari-web/app/controllers/wizard/step7/assign_master_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js index 4c8eccc..e4629e8 100644 --- a/ambari-web/app/controllers/wizard/step7/assign_master_controller.js +++ b/ambari-web/app/controllers/wizard/step7/assign_master_controller.js @@ -72,6 +72,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 * @private * @method
