You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2015/05/15 11:53:54 UTC

[3/6] ambari git commit: AMBARI-11158. Kerberos: Improve Review page content (alexantonenko)

AMBARI-11158. Kerberos: Improve Review page content (alexantonenko)


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

Branch: refs/heads/trunk
Commit: 3ccfc42bda19d5f2e642f81ca020674b2ca1590c
Parents: 8dbdf1d
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri May 15 12:27:53 2015 +0300
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri May 15 12:53:46 2015 +0300

----------------------------------------------------------------------
 .../main/admin/kerberos/step5_controller.js     | 31 +++++++++++++++++++-
 ambari-web/app/messages.js                      |  5 ++++
 .../app/templates/main/admin/kerberos/step5.hbs |  6 ++--
 3 files changed, 37 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3ccfc42b/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
index 7cad80f..c6cbf0f 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step5_controller.js
@@ -139,5 +139,34 @@ App.KerberosWizardStep5Controller = App.KerberosProgressPageController.extend({
 
   isSubmitDisabled: function () {
     return !["COMPLETED", "FAILED"].contains(this.get('status'));
-  }.property('status')
+  }.property('status'),
+
+  confirmProperties: function () {
+    var kdc_type = App.router.kerberosWizardController.content.serviceConfigProperties.findProperty('name','kdc_type').value,
+      filterObject = [
+        {
+          key: Em.I18n.t('admin.kerberos.wizard.step1.option.kdc'),
+          properties: ['kdc_type','kdc_host','realm','executable_search_paths']
+        },
+        {
+          key: Em.I18n.t('admin.kerberos.wizard.step1.option.ad'),
+          properties: ['kdc_type','kdc_host','realm','ldap_url','container_dn','executable_search_paths']
+        },
+        {
+          key: Em.I18n.t('admin.kerberos.wizard.step1.option.manual'),
+          properties: ['kdc_type','realm','executable_search_paths']
+        }
+      ],
+      kdcTypeProperties = filterObject.filter(function(item) {
+        return item.key === kdc_type;
+      }),
+      filterBy = kdcTypeProperties.length ? kdcTypeProperties[0].properties : [],
+      returnArray = App.router.kerberosWizardController.content.serviceConfigProperties.filter(function(item) {
+        return filterBy.contains(item.name);
+      }).map(function(item) {
+        item['label'] = Em.I18n.t('admin.kerberos.wizard.step5.'+item['name']+'.label');
+        return item;
+      });
+    return returnArray;
+  }.property('App.router.kerberosWizardController.content.@each.serviceConfigProperties')
 });

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ccfc42b/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index 0fbdcec..d54cdd7 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1026,7 +1026,12 @@ Em.I18n.translations = {
   '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.kdc_type.label': 'KDC Type',
+  'admin.kerberos.wizard.step5.kdc_host.label': 'KDC Host',
   'admin.kerberos.wizard.step5.realm.label': 'Realm Name',
+  'admin.kerberos.wizard.step5.ldap_url.label': 'LDAP URL',
+  'admin.kerberos.wizard.step5.container_dn.label': 'Container DN',
+  'admin.kerberos.wizard.step5.executable_search_paths.label': 'Executable path',
   'admin.kerberos.wizard.step5.exitWizard': 'Exit Wizard',
   'admin.kerberos.wizard.step5.downloadCSV': 'Download CSV',
   'admin.kerberos.wizard.step6.task0.title' : 'Stop Services',

http://git-wip-us.apache.org/repos/asf/ambari/blob/3ccfc42b/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 3c1adf4..bd3d27d 100644
--- a/ambari-web/app/templates/main/admin/kerberos/step5.hbs
+++ b/ambari-web/app/templates/main/admin/kerberos/step5.hbs
@@ -36,11 +36,9 @@
     </div>
 
     <div class="well pre-scrollable">
-      <p><strong>{{t installer.step0.clusterName.tooltip.title}}</strong>: {{App.router.clusterController.clusterName}}</p>
-      <p><strong>{{t admin.kerberos.wizard.step1.option.manual}}</strong>: {{App.router.kerberosWizardController.skipClientInstall}}</p>
-      {{#each App.router.kerberosWizardController.content.serviceConfigProperties}}
+      {{#each confirmProperties}}
         {{#if value}}
-          <p><strong>{{name}}</strong>: {{value}}</p>
+          <p><strong>{{label}}</strong>: {{value}}</p>
         {{/if}}
       {{/each}}
     </div>