Browse Source

AMBARI-6247. Add host stops all services. (alexantonenko via yusaku)

Yusaku Sako 11 years ago
parent
commit
7fecef8b77

+ 3 - 1
ambari-web/app/controllers/main/host/add_controller.js

@@ -399,7 +399,9 @@ App.AddHostController = App.WizardController.extend({
     var clusterName = this.get('content.cluster.name');
     var clusterName = this.get('content.cluster.name');
     var hostNames = [];
     var hostNames = [];
     for (var hostname in this.getDBProperty('hosts')) {
     for (var hostname in this.getDBProperty('hosts')) {
-      hostNames.push(hostname);
+      if(this.getDBProperty('hosts')[hostname].isInstalled == false){
+        hostNames.push(hostname);
+      }
     }
     }
     if(!clusterName || hostNames.length === 0) return false;
     if(!clusterName || hostNames.length === 0) return false;
 
 

+ 3 - 1
ambari-web/app/controllers/wizard/step9_controller.js

@@ -434,7 +434,9 @@ App.WizardStep9Controller = Em.Controller.extend({
       name = 'wizard.step9.add_host.launch_start_services';
       name = 'wizard.step9.add_host.launch_start_services';
       var hostnames = [];
       var hostnames = [];
       for (var hostname in this.get('wizardController').getDBProperty('hosts')) {
       for (var hostname in this.get('wizardController').getDBProperty('hosts')) {
-        hostnames.push(hostname);
+        if(this.get('hosts').findProperty('name', hostname)){
+          hostnames.push(hostname);
+        }
       }
       }
       data = {
       data = {
         "RequestInfo": {
         "RequestInfo": {