You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/06/08 15:22:36 UTC

ambari git commit: AMBARI-11730. When adding one host, the UI seems to be sending a request to add lot more (alexantonenko)

Repository: ambari
Updated Branches:
  refs/heads/trunk 3602b5835 -> ef9e122df


AMBARI-11730. When adding one host, the UI seems to be sending a request to add lot more (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ef9e122d
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ef9e122d
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ef9e122d

Branch: refs/heads/trunk
Commit: ef9e122df72e1b1c7303b988649484c4ab165b65
Parents: 3602b58
Author: Alex Antonenko <hi...@gmail.com>
Authored: Mon Jun 8 16:22:22 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Mon Jun 8 16:22:32 2015 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step3_controller.js    | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef9e122d/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index 8f89920..52c52ac 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -230,7 +230,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
     var bootStrapData = JSON.stringify({
         'verbose': true,
         'sshKey': this.get('content.installOptions.sshKey'),
-        'hosts': Em.keys(this.get('content.hosts')),
+        'hosts': this.getBootstrapHosts(),
         'user': this.get('content.installOptions.sshUser'),
         'userRunAs': App.get('supports.customizeAgentUserAccount') ? this.get('content.installOptions.agentUser') : 'root'
     });
@@ -245,6 +245,20 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
     });
   },
 
+  getBootstrapHosts: function () {
+    var hosts = this.get('content.hosts');
+    var bootstrapHosts = [];
+    for (var host in hosts) {
+      if (hosts.hasOwnProperty(host)) {
+        if (!hosts[host].isInstalled) {
+          bootstrapHosts.push(host);
+        }
+      }
+    }
+
+    return bootstrapHosts;
+  },
+
   /**
    * Make basic init steps
    * @method loadStep
@@ -870,7 +884,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
     });
   },
 
-  
+
   startHostcheck: function() {
     this.set('isWarningsLoaded', false);
     this.getHostNameResolution();