ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-11053. Manual Kerberos option fix. (yusaku)
Date Mon, 11 May 2015 22:17:59 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 3da48c232 -> 790c211d6


AMBARI-11053. Manual Kerberos option fix. (yusaku)


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

Branch: refs/heads/trunk
Commit: 790c211d63b4f8a1f4b21075e1a8bf5a32151744
Parents: 3da48c2
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Mon May 11 14:40:22 2015 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Mon May 11 15:17:51 2015 -0700

----------------------------------------------------------------------
 .../main/admin/kerberos/step2_controller.js     |  9 ++++++--
 .../main/admin/kerberos/wizard_controller.js    |  5 ++--
 ambari-web/app/messages.js                      |  2 ++
 ambari-web/app/routes/add_kerberos_routes.js    |  1 -
 ambari-web/app/styles/application.less          |  4 ++++
 .../app/templates/main/admin/kerberos/step5.hbs | 24 +++++++++++++++-----
 6 files changed, 34 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/790c211d/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
index c5d288c..eca8ab2 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step2_controller.js
@@ -98,7 +98,7 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
     App.config.setPreDefinedServiceConfigs(this.get('addMiscTabToPage'));
     //STEP 4: Add advanced configs
     App.config.addAdvancedConfigs(configs, advancedConfigs);
-    this.showAdConfigs(configs);
+    this.filterConfigs(configs);
     this.applyServicesConfigs(configs, storedConfigs);
   },
 
@@ -106,13 +106,18 @@ App.KerberosWizardStep2Controller = App.WizardStep7Controller.extend({
    * Make Active Directory specific configs visible if user has selected AD option
    * @param configs
    */
-  showAdConfigs: function (configs) {
+  filterConfigs: function (configs) {
     var kdcType = this.get('content.kerberosOption');
     var configNames = ['ldap_url', 'container_dn', 'create_attributes_template'];
     configNames.forEach(function (_configName) {
       var config = configs.findProperty('name', _configName);
       config.isVisible = kdcType === Em.I18n.t('admin.kerberos.wizard.step1.option.ad');
     }, this);
+    if (kdcType === Em.I18n.t('admin.kerberos.wizard.step1.option.manual')) {
+      var host = configs.findProperty('name', 'kdc_host');
+      host.isRequiredByAgent = false;
+      host.isVisible = false;
+    }
   },
 
   submit: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/790c211d/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
index d8c94d7..10046eb 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -21,7 +21,7 @@ var App = require('app');
 
 App.KerberosWizardController = App.WizardController.extend({
 
-  exceptionsOnSkipClient: ['realm', 'executable_search_paths'],
+  exceptionsOnSkipClient: [{'KDC': 'realm'}, {'KDC': 'kdc_type'}, {'Advanced kerberos-env':
'executable_search_paths'}],
 
   name: 'kerberosWizardController',
 
@@ -184,7 +184,8 @@ App.KerberosWizardController = App.WizardController.extend({
     newValue = newValue || false;
 
     for (var i=0; i < itemsArray.length; i += 1) {
-      if (self.get('exceptionsOnSkipClient').indexOf(itemsArray[i].get('name')) < 0) {
+      var isException = self.get('exceptionsOnSkipClient').filterProperty(itemsArray[i].get('category'),
itemsArray[i].get('name'));
+      if (!isException.length) {
         itemsArray[i].set('isVisible', newValue);
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/790c211d/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 252e75f..74e98fb 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1020,6 +1020,8 @@ Em.I18n.translations = {
   'admin.kerberos.wizard.progressPage.notice.inProgress': 'Please wait while cluster is being
kerberized',
   'admin.kerberos.wizard.step4.info.body': 'Configure principal name and keytab location
for service users and hadoop service components.',
   'admin.kerberos.wizard.step5.info.body': 'Please review the configuration before continuing
the setup process',
+  'admin.kerberos.wizard.step5.moreInfoNonManual.body': 'Using the <b>Download CSV
button</b>, you can download a csv file which contains a list of the principals and
keytabs that will automatically be created by Ambari.',
+  'admin.kerberos.wizard.step5.moreInfoManual.body': 'Important: Use the <b>Download
CSV</b> button to obtain a list of the <b>required</b> principals and keytabs
that are needed by Ambari to enable Kerberos in the cluster. <b>Do not proceed</b>
until you have manually created and distributed the principals and keytabs to the cluster
hosts.',
   'admin.kerberos.wizard.step5.realm.label': 'Realm Name',
   'admin.kerberos.wizard.step5.exitWizard': 'Exit Wizard',
   'admin.kerberos.wizard.step5.downloadCSV': 'Download CSV',

http://git-wip-us.apache.org/repos/asf/ambari/blob/790c211d/ambari-web/app/routes/add_kerberos_routes.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/add_kerberos_routes.js b/ambari-web/app/routes/add_kerberos_routes.js
index d3e9c6e..0f9f3e3 100644
--- a/ambari-web/app/routes/add_kerberos_routes.js
+++ b/ambari-web/app/routes/add_kerberos_routes.js
@@ -177,7 +177,6 @@ module.exports = App.WizardRoute.extend({
         kerberosWizardStep2Controller.get('stepConfigs')[0].get('configs').findProperty('name',
'manage_identities').set('value', 'false');
         kerberosWizardStep2Controller.get('stepConfigs')[0].get('configs').findProperty('name',
'install_packages').set('value', 'false');
         kerberosWizardStep2Controller.get('stepConfigs')[0].get('configs').findProperty('name',
'manage_krb5_conf').set('value', 'false');
-        kerberosWizardStep2Controller.get('stepConfigs')[0].get('configs').findProperty('name',
'kdc_type').set('value', 'none');
       }
 
       kerberosWizardController.saveServiceConfigProperties(kerberosWizardStep2Controller);

http://git-wip-us.apache.org/repos/asf/ambari/blob/790c211d/ambari-web/app/styles/application.less
----------------------------------------------------------------------
diff --git a/ambari-web/app/styles/application.less b/ambari-web/app/styles/application.less
index 1bd8d05..1e8e6d4 100644
--- a/ambari-web/app/styles/application.less
+++ b/ambari-web/app/styles/application.less
@@ -5372,6 +5372,10 @@ input[type="radio"].align-checkbox, input[type="checkbox"].align-checkbox
{
 
 .mbm { margin-bottom: @space-m; }
 
+.mls {
+  margin-left: @space-s;
+}
+
 .mll {
   margin-left: @space-l;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/790c211d/ambari-web/app/templates/main/admin/kerberos/step5.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/main/admin/kerberos/step5.hbs b/ambari-web/app/templates/main/admin/kerberos/step5.hbs
index 5b29a2c..3c1adf4 100644
--- a/ambari-web/app/templates/main/admin/kerberos/step5.hbs
+++ b/ambari-web/app/templates/main/admin/kerberos/step5.hbs
@@ -19,9 +19,21 @@
   <div id="confirm-configuration">
     <h2>{{t admin.kerberos.wizard.step5.header}}</h2>
 
-    <p class="alert alert-info">
-      {{t admin.kerberos.wizard.step5.info.body}}
-    </p>
+    <div class="alert alert-info">
+      <p>
+        {{t admin.kerberos.wizard.step5.info.body}}
+      </p>
+      {{#unless App.router.kerberosWizardController.skipClientInstall}}
+        <p>
+          {{t admin.kerberos.wizard.step5.moreInfoNonManual.body}}
+        </p>
+      {{/unless}}
+      {{#if App.router.kerberosWizardController.skipClientInstall}}
+        <p>
+          {{t admin.kerberos.wizard.step5.moreInfoManual.body}}
+        </p>
+      {{/if}}
+    </div>
 
     <div class="well pre-scrollable">
       <p><strong>{{t installer.step0.clusterName.tooltip.title}}</strong>:
{{App.router.clusterController.clusterName}}</p>
@@ -33,9 +45,9 @@
       {{/each}}
     </div>
 
-    <div class="additional btn-area">
-      <button class="btn btn-danger" {{action exitWizard}}>{{t admin.kerberos.wizard.step5.exitWizard}}</button>
-      <button class="btn btn-primary pull-right" {{action downloadCSV}}>{{t admin.kerberos.wizard.step5.downloadCSV}}</button>
+    <div class="additional btn-area clearfix">
+      <button class="btn btn-primary pull-right mls" {{action downloadCSV}}>{{t admin.kerberos.wizard.step5.downloadCSV}}</button>
+      <button class="btn pull-right" {{action exitWizard}}>{{t admin.kerberos.wizard.step5.exitWizard}}</button>
     </div>
 
     <div class="btn-area">


Mime
View raw message