Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 5d1920718 -> b036bfaae


AMBARI-18817. Add ability to Skip Host check option on bootstrap page. (jaimin)


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

Branch: refs/heads/branch-2.5
Commit: b036bfaae423afc40dde4f1964117206ea903251
Parents: 5d19207
Author: Jaimin Jetly <[email protected]>
Authored: Tue Nov 8 12:40:09 2016 -0800
Committer: Jaimin Jetly <[email protected]>
Committed: Tue Nov 8 12:40:09 2016 -0800

----------------------------------------------------------------------
 ambari-web/app/config.js                          |  1 +
 .../app/controllers/wizard/step3_controller.js    | 14 +++++++++++++-
 ambari-web/app/templates/wizard/step3.hbs         | 18 ++++++++++--------
 3 files changed, 24 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b036bfaa/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 4e3e73a..87f3d75 100644
--- a/ambari-web/app/config.js
+++ b/ambari-web/app/config.js
@@ -68,6 +68,7 @@ App.enableDigitalClock = false;
 App.enableExperimental = false;
 
 App.supports = {
+  disableHostCheckOnAddHostWizard: false,
   preUpgradeCheck: true,
   displayOlderVersions: false,
   autoRollbackHA: false,

http://git-wip-us.apache.org/repos/asf/ambari/blob/b036bfaa/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 0ccf2ed..793d33d 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -222,6 +222,13 @@ App.WizardStep3Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
   checksUpdateStatus: null,
 
   /**
+   * disables host check on Add host wizard as per the experimental flag
+   */
+  disableHostCheck: function () {
+    return App.get('supports.disableHostCheckOnAddHostWizard') && 
this.get('isAddHostWizard');
+  }.property('App.supports.disableHostCheckOnAddHostWizard', 
'isAddHostWizard'),
+
+  /**
    *
    * @method navigateStep
    */
@@ -939,7 +946,12 @@ App.WizardStep3Controller = 
Em.Controller.extend(App.ReloadPopupMixin, {
       this.getHostCheckSuccess();
     } else {
       var data = this.getDataForCheckRequest("host_resolution_check", true);
-      data ? this.requestToPerformHostCheck(data) : this.stopHostCheck();
+      if (data && !this.get('disableHostCheck')) {
+        this.requestToPerformHostCheck(data);
+      } else {
+        this.stopHostCheck();
+        this.stopRegistration();
+      }
     }
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b036bfaa/ambari-web/app/templates/wizard/step3.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step3.hbs 
b/ambari-web/app/templates/wizard/step3.hbs
index f5648e1..5a71371 100644
--- a/ambari-web/app/templates/wizard/step3.hbs
+++ b/ambari-web/app/templates/wizard/step3.hbs
@@ -138,15 +138,17 @@
       <a href="#" {{action registeredHostsPopup 
target="controller"}}>{{view.registeredHostsMessage}}</a>
     </div>
   {{/if}}
-  <div {{bindAttr class=":alert view.status isWarningsBoxVisible::hidden"}}>
-    {{view.message}}
-    <a href="#" {{action hostWarningsPopup warnings 
target="controller"}}>{{view.linkText}}</a>
-    {{#unless isBootstrapFailed}}
-      {{#unless isWarningsLoaded}}
-        {{view App.SpinnerView}}
+  {{#unless disableHostCheck}}
+    <div {{bindAttr class=":alert view.status isWarningsBoxVisible::hidden"}}>
+      {{view.message}}
+      <a href="#" {{action hostWarningsPopup warnings 
target="controller"}}>{{view.linkText}}</a>
+      {{#unless isBootstrapFailed}}
+        {{#unless isWarningsLoaded}}
+          {{view App.SpinnerView}}
+        {{/unless}}
       {{/unless}}
-    {{/unless}}
-  </div>
+    </div>
+  {{/unless}}
   <div class="btn-area">
     <button type="button" class="btn pull-left installer-back-btn" {{bindAttr 
disabled="isBackButtonDisabled"}} {{action back}}>
       &larr; {{t common.back}}

Reply via email to