瀏覽代碼

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

Yusaku Sako 11 年之前
父節點
當前提交
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 hostNames = [];
     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;
 

+ 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';
       var hostnames = [];
       for (var hostname in this.get('wizardController').getDBProperty('hosts')) {
-        hostnames.push(hostname);
+        if(this.get('hosts').findProperty('name', hostname)){
+          hostnames.push(hostname);
+        }
       }
       data = {
         "RequestInfo": {