Author: yusaku
Date: Thu Apr 11 18:03:56 2013
New Revision: 1467016

URL: http://svn.apache.org/r1467016
Log:
AMBARI-1874. Add Service Wizard: remove the ability to install master 
components for already installed services. (yusaku)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1467016&r1=1467015&r2=1467016&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Apr 11 18:03:56 2013
@@ -681,6 +681,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1874. Add Service Wizard: remove the ability to install master
+ components for already installed services. (yusaku)
+
  AMBARI-1872. Ambari FE is not setting proper value for 
  fs.checkpoint.edits.dir (jaimin)
 

Modified: 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js?rev=1467016&r1=1467015&r2=1467016&view=diff
==============================================================================
--- 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js 
(original)
+++ 
incubator/ambari/trunk/ambari-web/app/controllers/wizard/step5_controller.js 
Thu Apr 11 18:03:56 2013
@@ -69,15 +69,20 @@ App.WizardStep5Controller = Em.Controlle
    */
   updateComponent: function(componentName){
     var component = this.last(componentName);
+
+    var services = this.get('content.services').filterProperty('isInstalled', 
true).mapProperty('serviceName');
+    var currentService = componentName.split('_')[0];
+    var showControl = !services.contains(currentService);
+
     if (component) {
-      if (this.get("selectedServicesMasters").filterProperty("component_name", 
componentName).length < this.get("hosts.length") && 
!this.get('isReassignWizard')) {
-        component.set('showAddControl', true);
-      } else {
-        component.set('showRemoveControl', false);
-      }
-      if(componentName == 'ZOOKEEPER_SERVER' || componentName == 
'HBASE_MASTER'){
-        this.rebalanceComponentHosts(componentName);
+      if(showControl){
+        if 
(this.get("selectedServicesMasters").filterProperty("component_name", 
componentName).length < this.get("hosts.length") && 
!this.get('isReassignWizard')) {
+          component.set('showAddControl', true);
+        } else {
+          component.set('showRemoveControl', false);
+        }
       }
+      this.rebalanceComponentHosts(componentName);
     }
   },
 


Reply via email to