Repository: ambari Updated Branches: refs/heads/trunk 1487ad371 -> fb92ad29f
AMBARI-10322 [WinTP2] Agent Automatic Bootstrap: Ambari Web UI changes Enabled automatic host bootstrap in WIndows. No SSH key necessary, hence only the radio butto with appropriate message needs to be visible. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fb92ad29 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fb92ad29 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fb92ad29 Branch: refs/heads/trunk Commit: fb92ad29fea52283464b18df7114ffb81989c207 Parents: 1487ad3 Author: Florian Barca <[email protected]> Authored: Thu Apr 2 10:39:29 2015 -0700 Committer: Florian Barca <[email protected]> Committed: Thu Apr 2 10:39:29 2015 -0700 ---------------------------------------------------------------------- .../src/main/windows/ambari-server.cmd | 2 +- ambari-web/app/controllers/wizard.js | 4 +- .../app/controllers/wizard/step2_controller.js | 12 +++--- ambari-web/app/messages.js | 8 +++- ambari-web/app/templates/wizard/step2.hbs | 39 +++++++++++++++----- 5 files changed, 44 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/fb92ad29/ambari-server/src/main/windows/ambari-server.cmd ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/windows/ambari-server.cmd b/ambari-server/src/main/windows/ambari-server.cmd index 34d1ccc..fb42078 100644 --- a/ambari-server/src/main/windows/ambari-server.cmd +++ b/ambari-server/src/main/windows/ambari-server.cmd @@ -1,2 +1,2 @@ @echo off -powershell -File ambari-server.ps1 %* \ No newline at end of file +powershell -ExecutionPolicy unrestricted -File ambari-server.ps1 %* \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/fb92ad29/ambari-web/app/controllers/wizard.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js index a8e66bf..0c54fa2 100644 --- a/ambari-web/app/controllers/wizard.js +++ b/ambari-web/app/controllers/wizard.js @@ -534,8 +534,8 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM installWindowsOptionsTemplate: { hostNames: "", //string - manualInstall: true, //true, false - useSsh: false, //bool + manualInstall: false, //true, false + useSsh: true, //bool javaHome: App.defaultJavaHome, //string localRepo: false, //true, false sshKey: "", //string http://git-wip-us.apache.org/repos/asf/ambari/blob/fb92ad29/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 a4de17b..3daf977 100644 --- a/ambari-web/app/controllers/wizard/step2_controller.js +++ b/ambari-web/app/controllers/wizard/step2_controller.js @@ -121,7 +121,7 @@ App.WizardStep2Controller = Em.Controller.extend({ */ hostsError: null, - isSSHRegistrationEnabled: function () { + useSSH: function () { return !App.get('isHadoopWindowsStack'); }.property('App.isHadoopWindowsStack'), @@ -130,22 +130,22 @@ App.WizardStep2Controller = Em.Controller.extend({ * @type {string|null} */ sshKeyError: function () { - if (this.get('hasSubmitted') && this.get('manualInstall') === false && Em.isEmpty(this.get('sshKey').trim())) { + if (this.get('hasSubmitted') && this.get('manualInstall') === false && this.get('useSSH') && Em.isEmpty(this.get('sshKey').trim())) { return Em.I18n.t('installer.step2.sshKey.error.required'); } return null; - }.property('sshKey', 'manualInstall', 'hasSubmitted'), + }.property('sshKey', 'useSSH', 'manualInstall', 'hasSubmitted'), /** * Error-message if <code>sshUser</code> is empty, null otherwise * @type {string|null} */ sshUserError: function () { - if (this.get('manualInstall') === false && Em.isEmpty(this.get('sshUser').trim())) { + if (this.get('manualInstall') === false && this.get('useSSH') && Em.isEmpty(this.get('sshUser').trim())) { return Em.I18n.t('installer.step2.sshUser.required'); } return null; - }.property('sshUser', 'hasSubmitted', 'manualInstall'), + }.property('sshUser', 'useSSH', 'hasSubmitted', 'manualInstall'), /** * Error-message if <code>agentUser</code> is empty, null otherwise @@ -469,7 +469,7 @@ App.WizardStep2Controller = Em.Controller.extend({ * @method manualInstallWarningPopup */ manualInstallWarningPopup: function () { - if (this.get('isSSHRegistrationEnabled') && !this.get('content.installOptions.useSsh')) { + if (!this.get('content.installOptions.useSsh')) { App.ModalPopup.show({ header: Em.I18n.t('common.warning'), body: Em.I18n.t('installer.step2.manualInstall.info'), http://git-wip-us.apache.org/repos/asf/ambari/blob/fb92ad29/ambari-web/app/messages.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js index 6b99af4..6feaf0b 100644 --- a/ambari-web/app/messages.js +++ b/ambari-web/app/messages.js @@ -507,14 +507,18 @@ Em.I18n.translations = { 'installer.step2.javaHome.tooltip.title' : 'JAVA_HOME', 'installer.step2.javaHome.tooltip.content' : 'Path to 64-bit JAVA_HOME. /usr/jdk/jdk1.6.0_31 is the default used by Ambari. You can override this to a specific path that contains the JDK. <br/> Note: the path must be valid on <b>ALL</b> hosts in your cluster.', 'installer.step2.javaHome.tooltip.placeholder' : '/usr/jdk/jdk1.6.0_31', + 'installer.step2.automaticInstall.tooltip.title':'automatic registration', + 'installer.step2.automaticInstall.tooltip.content':'Ambari will automatically install and register the Ambari Agent on each host prior to the cluster installation.', 'installer.step2.useSsh.provide' : 'Provide your', 'installer.step2.useSsh.provide_id_rsa' : ' to automatically register hosts', 'installer.step2.useSsh.tooltip.title':'SSH Private Key', 'installer.step2.useSsh.tooltip.content':'The <b>SSH Private Key File</b> is used to connect to the target hosts in your cluster to install the Ambari Agent.', - 'installer.step2.manualInstall.perform':'Perform', - 'installer.step2.manualInstall.perform_on_hosts':'on hosts and do not use SSH', + 'installer.step2.install.perform':'Perform', + 'installer.step2.install.perform_on_hosts':'on hosts', + 'installer.step2.install.without_ssh':' and do not use SSH', 'installer.step2.manualInstall.tooltip.title':'manual registration', 'installer.step2.manualInstall.tooltip.content':'Manually registering the Ambari Agent on each host eliminates the need for SSH and should be performed prior to continuing cluster installation.', + 'installer.step2.manualInstall.tooltip.content_no_ssh':'Manually registering the Ambari Agent on each host should be performed prior to continuing cluster installation.', 'installer.step2.manualInstall.popup.header':'Before You Proceed', 'installer.step2.manualInstall.popup.body':'You must install Ambari Agents on each host you want to manage before you proceed.', 'installer.step2.warning.popup.body':'<p>The following hostnames are not valid FQDNs:</p><p> {0} </p><p>This may cause problems during installation. Do you want to continue?</p>', http://git-wip-us.apache.org/repos/asf/ambari/blob/fb92ad29/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 572c3ad..a194cc0 100644 --- a/ambari-web/app/templates/wizard/step2.hbs +++ b/ambari-web/app/templates/wizard/step2.hbs @@ -47,17 +47,26 @@ <div class="ambari-agents"> <h5>{{t installer.step2.sshKey}}</h5> - {{#if isSSHRegistrationEnabled}} - <label class="radio"> - {{view view.providingSSHKeyRadioButton}} + <label class="radio"> + {{view view.providingSSHKeyRadioButton}} + {{#if useSSH}} {{t installer.step2.useSsh.provide}} <a href="javascript:void(null)" rel="popover" {{translateAttr title="installer.step2.useSsh.tooltip.title" data-content="installer.step2.useSsh.tooltip.content"}}> {{t installer.step2.useSsh.tooltip.title}}</a> {{t installer.step2.useSsh.provide_id_rsa}} - </label> + {{else}} + {{t installer.step2.install.perform}} + <a href="javascript:void(null)" + rel="popover" + {{translateAttr title="installer.step2.automaticInstall.tooltip.title" data-content="installer.step2.automaticInstall.tooltip.content"}}> + {{t installer.step2.automaticInstall.tooltip.title}}</a> + {{t installer.step2.install.perform_on_hosts}} + {{/if}} + </label> + {{#if useSSH}} <div class="ssh-key-input"> {{#if view.isFileApi}} {{view App.SshKeyFileUploader disabledBinding="view.sshKeyState"}} @@ -101,12 +110,22 @@ <label class="radio"> {{view view.manualRegistrationRadioButton}} - {{t installer.step2.manualInstall.perform}} - <a href="javascript:void(null)" - rel="popover" - {{translateAttr title="installer.step2.manualInstall.tooltip.title" data-content="installer.step2.manualInstall.tooltip.content"}}> - {{t installer.step2.manualInstall.tooltip.title}}</a> - {{t installer.step2.manualInstall.perform_on_hosts}} + {{t installer.step2.install.perform}} + {{#if useSSH}} + <a href="javascript:void(null)" + rel="popover" + {{translateAttr title="installer.step2.manualInstall.tooltip.title" data-content="installer.step2.manualInstall.tooltip.content"}}> + {{t installer.step2.manualInstall.tooltip.title}}</a> + {{else}} + <a href="javascript:void(null)" + rel="popover" + {{translateAttr title="installer.step2.manualInstall.tooltip.title" data-content="installer.step2.manualInstall.tooltip.content_no_ssh"}}> + {{t installer.step2.manualInstall.tooltip.title}}</a> + {{/if}} + {{t installer.step2.install.perform_on_hosts}} + {{#if useSSH}} + {{t installer.step2.install.without_ssh}} + {{/if}} </label> </div>
