Repository: ambari Updated Branches: refs/heads/branch-2.6 1140bbc07 -> f49cf54e9
AMBARI-21954. Option to skip Host Check during the host add wizard. (Ishan via Jaimin) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f49cf54e Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f49cf54e Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f49cf54e Branch: refs/heads/branch-2.6 Commit: f49cf54e9655a9f99b33cce52436edf34c372676 Parents: 1140bbc Author: Jaimin Jetly <[email protected]> Authored: Tue Sep 19 18:49:00 2017 -0700 Committer: Jaimin Jetly <[email protected]> Committed: Tue Sep 19 18:49:00 2017 -0700 ---------------------------------------------------------------------- ambari-web/app/config.js | 1 - .../app/controllers/wizard/step2_controller.js | 4 +++- .../app/controllers/wizard/step3_controller.js | 6 +++--- ambari-web/app/messages.js | 3 +++ ambari-web/app/templates/wizard/step2.hbs | 8 ++++++++ ambari-web/app/views/wizard/step2_view.js | 17 +++++++++++++++++ 6 files changed, 34 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f49cf54e/ambari-web/app/config.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/config.js b/ambari-web/app/config.js index f5959f0..30c28d1 100644 --- a/ambari-web/app/config.js +++ b/ambari-web/app/config.js @@ -68,7 +68,6 @@ 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/f49cf54e/ambari-web/app/controllers/wizard/step2_controller.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard/step2_controller.js b/ambari-web/app/controllers/wizard/step2_controller.js index 7bbb2dd..05813e2 100644 --- a/ambari-web/app/controllers/wizard/step2_controller.js +++ b/ambari-web/app/controllers/wizard/step2_controller.js @@ -557,6 +557,8 @@ App.WizardStep2Controller = Em.Controller.extend({ this.set('content.hosts', $.extend(hosts, this.getHostInfo())); this.setAmbariJavaHome(); - } + }, + + isAddHostWizard: Em.computed.equal('content.controllerName', 'addHostController') }); http://git-wip-us.apache.org/repos/asf/ambari/blob/f49cf54e/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 9358e83..508dd22 100644 --- a/ambari-web/app/controllers/wizard/step3_controller.js +++ b/ambari-web/app/controllers/wizard/step3_controller.js @@ -222,11 +222,11 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, { checksUpdateStatus: null, /** - * disables host check on Add host wizard as per the experimental flag + * skips host check on Add host wizard based on step 2 */ disableHostCheck: function () { - return App.get('supports.disableHostCheckOnAddHostWizard') && this.get('isAddHostWizard'); - }.property('App.supports.disableHostCheckOnAddHostWizard', 'isAddHostWizard'), + return this.get('content.installOptions.skipHostChecks') && this.get('isAddHostWizard'); + }.property('content.installOptions.skipHostChecks', 'isAddHostWizard'), /** * http://git-wip-us.apache.org/repos/asf/ambari/blob/f49cf54e/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 57b9f80..8b9bd12 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -715,6 +715,9 @@ Em.I18n.translations = { 'installer.step2.bootStrap.error':'Errors were encountered while setting up Ambari Agents on the hosts.', 'installer.step2.bootStrap.inProgress':'Please wait while Ambari Agents are being set up on the hosts. This can take several minutes depending on the number of hosts.', 'installer.step2.bootStrap.header':'Setting Up Ambari Agents', + 'installer.step2.skipHostChecks.label': 'Skip host checks', + 'installer.step2.skipHostChecks.popup.header': 'Warning', + 'installer.step2.skipHostChecks.popup.body': 'By skipping host checks, Ambari will not check and warn if any issues with the host are identified and the host will be added to the cluster as is.', 'installer.step3.header':'Confirm Hosts', 'installer.step3.body':'Registering your hosts.<br>' + http://git-wip-us.apache.org/repos/asf/ambari/blob/f49cf54e/ambari-web/app/templates/wizard/step2.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/wizard/step2.hbs b/ambari-web/app/templates/wizard/step2.hbs index 42db6cc..a285e54 100644 --- a/ambari-web/app/templates/wizard/step2.hbs +++ b/ambari-web/app/templates/wizard/step2.hbs @@ -140,6 +140,14 @@ {{/if}} </label> + {{#if isAddHostWizard}} + <br> + <label class="checkbox"> + {{view view.skipHostsCheckBox}} + {{t installer.step2.skipHostChecks.label}} + </label> + {{/if}} + </div> </div> http://git-wip-us.apache.org/repos/asf/ambari/blob/f49cf54e/ambari-web/app/views/wizard/step2_view.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/wizard/step2_view.js b/ambari-web/app/views/wizard/step2_view.js index 1988f4e..746cae8 100644 --- a/ambari-web/app/views/wizard/step2_view.js +++ b/ambari-web/app/views/wizard/step2_view.js @@ -117,6 +117,23 @@ App.WizardStep2View = Em.View.extend({ } }), + skipHostsCheckBox: Em.Checkbox.extend({ + attributeBindings: ['checked'], + checked: Em.computed.alias('controller.content.installOptions.skipHostChecks'), + click: function () { + var skipHostChecks = !this.get('controller.content.installOptions.skipHostChecks'); + this.set('controller.content.installOptions.skipHostChecks', skipHostChecks); + if(skipHostChecks) { + App.ModalPopup.show({ + header: Em.I18n.t('installer.step2.skipHostChecks.popup.header'), + body: Em.I18n.t('installer.step2.skipHostChecks.popup.body'), + primary: Em.I18n.t('ok'), + secondary: false + }); + } + } + }), + /** * Textarea with ssh-key * @type {Ember.TextField}
