ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-18817. Add ability to Skip Host check option on bootstrap page. (jaimin)
Date Tue, 08 Nov 2016 21:46:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk d838763dc -> eca41fad1


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/eca41fad
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/eca41fad
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/eca41fad

Branch: refs/heads/trunk
Commit: eca41fad13dd0c5870c7467108f37090eec6598b
Parents: d838763
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Tue Nov 8 12:40:09 2016 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Tue Nov 8 13:45:53 2016 -0800

----------------------------------------------------------------------
 ambari-web/app/config.js                        |  1 +
 .../main/host/details/actions/check_host.js     | 21 +++++++++++++++++++-
 ambari-web/app/templates/wizard/step3.hbs       | 18 +++++++++--------
 3 files changed, 31 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/eca41fad/ambari-web/app/config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js
index 8886f49..a2028ad 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/eca41fad/ambari-web/app/mixins/main/host/details/actions/check_host.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/main/host/details/actions/check_host.js b/ambari-web/app/mixins/main/host/details/actions/check_host.js
index 982a197..532353f 100644
--- a/ambari-web/app/mixins/main/host/details/actions/check_host.js
+++ b/ambari-web/app/mixins/main/host/details/actions/check_host.js
@@ -95,6 +95,20 @@ App.CheckHostMixin = Em.Mixin.create({
   warningsByHost: [],
 
   /**
+   * This property should be overridden if being used for Add Host Wizard
+   * @return {bool}
+   */
+  isAddHostWizard: false,
+
+
+  /**
+   * 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'),
+
+  /**
    * send request to create tasks for performing hosts checks
    * @params {object} data
    *    {
@@ -390,7 +404,12 @@ App.CheckHostMixin = Em.Mixin.create({
       this.getHostCheckSuccess();
     } else {
       var data = dataForHostCheck || 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/eca41fad/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 d827de8..d804d29 100644
--- a/ambari-web/app/templates/wizard/step3.hbs
+++ b/ambari-web/app/templates/wizard/step3.hbs
@@ -129,15 +129,17 @@
           <a href="#" {{action registeredHostsPopup target="controller"}}>{{view.registeredHostsMessage}}</a>
         </div>
       {{/if}}
-      <div {{bindAttr class=":alert :alert-warning 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 :alert-warning 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>
   </div>


Mime
View raw message