Browse Source

AMBARI-1874. Add Service Wizard: remove the ability to install master components for already installed services. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1467016 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 years ago
parent
commit
c9b4dca3db
2 changed files with 15 additions and 7 deletions
  1. 3 0
      CHANGES.txt
  2. 12 7
      ambari-web/app/controllers/wizard/step5_controller.js

+ 3 - 0
CHANGES.txt

@@ -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)
 

+ 12 - 7
ambari-web/app/controllers/wizard/step5_controller.js

@@ -69,15 +69,20 @@ App.WizardStep5Controller = Em.Controller.extend({
    */
   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);
     }
   },