You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2016/11/09 21:49:59 UTC
[02/13] ambari git commit: AMBARI-18817. Add ability to Skip Host
check option on bootstrap page. (jaimin)
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/branch-feature-AMBARI-18634
Commit: eca41fad13dd0c5870c7467108f37090eec6598b
Parents: d838763
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue Nov 8 12:40:09 2016 -0800
Committer: Jaimin Jetly <ja...@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>