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

ambari git commit: AMBARI-12787. Add Host is only performing Hostname Resolution check for added hosts

Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 b9d7ef759 -> f9f7836eb


AMBARI-12787. Add Host is only performing Hostname Resolution check for added hosts


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

Branch: refs/heads/branch-2.1
Commit: f9f7836ebce127160a8bcf6af17b92b83b98dd48
Parents: b9d7ef7
Author: Aleksandr Kovalenko <ak...@hortonworks.com>
Authored: Mon Aug 17 17:13:29 2015 +0300
Committer: Aleksandr Kovalenko <ak...@hortonworks.com>
Committed: Mon Aug 17 17:15:24 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/f9f7836e/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 e60f026..ee6563f 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -81,6 +81,14 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
   }.property('isRegistrationInProgress', 'isWarningsLoaded'),
 
   /**
+   * Controller is using in Add Host Wizard
+   * @return {bool}
+   */
+  isAddHostWizard: function () {
+    return this.get('content.controllerName') === 'addHostController';
+  }.property('content.controllerName'),
+
+  /**
    * @type {bool}
    */
   isLoaded: false,
@@ -931,12 +939,14 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
    * @param {string} checkExecuteList - for now supported:
    *  <code>"last_agent_env_check"<code>
    *  <code>"host_resolution_check"<code>
-   * @param {boolean} addHosts - true
+   * @param {boolean} addHostsParameter - define whether add hosts parameter to RequestInfo
    * @return {object|null}
    * @method getDataForCheckRequest
    */
-  getDataForCheckRequest: function (checkExecuteList, addHosts) {
-    var hosts = this.get('bootHosts').filterProperty('bootStatus', 'REGISTERED').getEach('name').join(",");
+  getDataForCheckRequest: function (checkExecuteList, addHostsParameter) {
+    var newHosts = this.get('bootHosts').filterProperty('bootStatus', 'REGISTERED').getEach('name');
+    var hosts = this.get('isAddHostWizard') ? [].concat.apply([], App.MasterComponent.find().mapProperty('hostNames')).concat(newHosts).uniq() : newHosts;
+    hosts = hosts.join(',');
     if (hosts.length == 0) return null;
     var jdk_location = App.router.get('clusterController.ambariProperties.jdk_location');
     var RequestInfo = {
@@ -948,7 +958,7 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
         "threshold": "20"
       }
     };
-    if (addHosts) {
+    if (addHostsParameter) {
       RequestInfo.parameters.hosts = hosts;
     }
     var resource_filters = {