You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2015/01/27 12:15:57 UTC

[1/2] ambari git commit: AMBARI-9346 Kerberos Wizard: UI cleanup #5. (ababiichuk)

Repository: ambari
Updated Branches:
  refs/heads/trunk f296ba851 -> 7458ff226


AMBARI-9346 Kerberos Wizard: UI cleanup #5. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: e44e73ed8d728d5fce407b25e4288795fac2e010
Parents: f296ba8
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Jan 27 10:22:03 2015 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Jan 27 10:22:03 2015 +0200

----------------------------------------------------------------------
 .../main/admin/kerberos/step1_controller.js      | 16 ++++++++++++++++
 .../main/admin/kerberos/wizard_controller.js     |  8 +++++---
 ambari-web/app/data/HDP2/site_properties.js      |  4 ++--
 ambari-web/app/messages.js                       | 19 +++++++++++--------
 ambari-web/app/routes/add_kerberos_routes.js     | 19 +++++++++++++------
 .../common/modal_popups/confirmation_popup.js    |  4 +++-
 .../kerberos/kerberos_wizard_controler_test.js   | 12 +++++++++---
 7 files changed, 59 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e44e73ed/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
index e3c4a89..aff342d 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
@@ -39,6 +39,10 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
         Em.Object.create({
           displayText: Em.I18n.t('admin.kerberos.wizard.step1.option.kdc.condition.2'),
           checked: false
+        }),
+        Em.Object.create({
+          displayText: Em.I18n.t('admin.kerberos.wizard.step1.option.kdc.condition.3'),
+          checked: false
         })
       ]
     }),
@@ -53,6 +57,18 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
         Em.Object.create({
           displayText: Em.I18n.t('admin.kerberos.wizard.step1.option.ad.condition.2'),
           checked: false
+        }),
+        Em.Object.create({
+          displayText: Em.I18n.t('admin.kerberos.wizard.step1.option.ad.condition.3'),
+          checked: false
+        }),
+        Em.Object.create({
+          displayText: Em.I18n.t('admin.kerberos.wizard.step1.option.ad.condition.4'),
+          checked: false
+        }),
+        Em.Object.create({
+          displayText: Em.I18n.t('admin.kerberos.wizard.step1.option.ad.condition.5'),
+          checked: false
         })
       ]
     })

http://git-wip-us.apache.org/repos/asf/ambari/blob/e44e73ed/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 b66049d..9c85c67 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/wizard_controller.js
@@ -278,11 +278,13 @@ App.KerberosWizardController = App.WizardController.extend({
   /**
    * shows popup with to warn user
    * @param primary
+   * @param isCritical
    */
-  warnBeforeExitPopup: function(primary) {
+  warnBeforeExitPopup: function(primary, isCritical) {
     var primaryText = Em.I18n.t('common.exitAnyway');
-    var msg = Em.I18n.t('admin.kerberos.wizard.exit.msg');
-    return App.showConfirmationPopup(primary, msg, null, null, primaryText)
+    var msg = isCritical ? Em.I18n.t('admin.kerberos.wizard.exit.critical.msg')
+      : Em.I18n.t('admin.kerberos.wizard.exit.warning.msg');
+    return App.showConfirmationPopup(primary, msg, null, null, primaryText, isCritical);
   },
   /**
    * Clear all temporary data

http://git-wip-us.apache.org/repos/asf/ambari/blob/e44e73ed/ambari-web/app/data/HDP2/site_properties.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js
index 3fa78f3..1d9c2b9 100644
--- a/ambari-web/app/data/HDP2/site_properties.js
+++ b/ambari-web/app/data/HDP2/site_properties.js
@@ -4483,13 +4483,13 @@ var hdp2properties = [
 /************************************************Kerberos Descriptor******************************************/
   {
     "name": "smokeuser_principal_name",
-    "displayName": "Smokeuser principal",
+    "displayName": "Smoke user principal",
     "category": "Ambari Principals",
     "index": 1
   },
   {
     "name": "smokeuser_keytab",
-    "displayName": "Smokeuser keytab",
+    "displayName": "Smoke user keytab",
     "category": "Ambari Principals",
     "index": 2
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/e44e73ed/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index df4e372..aa98f01 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -977,9 +977,8 @@ Em.I18n.translations = {
   'admin.kerberos.wizard.header':'Enable Kerberos Wizard',
   'admin.kerberos.button.enable': 'Enable Kerberos',
   'admin.kerberos.button.disable': 'Disable Kerberos',
-  'admin.kerberos.wizard.exit.msg': 'Enable Security is in progress. You must allow the wizard to complete for Ambari to be in usable state. ' +
-    'If you choose to quit, you must follow manual instructions to activate or disable security as documented in the Ambari User Guide. ' +
-    'Do you really want to exit Kerberos Security Wizard?',
+  'admin.kerberos.wizard.exit.warning.msg': 'Configuring Kerberos is in progress. Do you really want to exit the Enable Kerberos Wizard?',
+  'admin.kerberos.wizard.exit.critical.msg': 'Configuring Kerberos is in progress. <strong>Before dismissing, you should complete the wizard.</strong> Do you really want to exit the Enable Kerberos Wizard?',
   'admin.kerberos.wizard.step1.header': 'Get Started',
   'admin.kerberos.wizard.step2.header': 'Configure Kerberos',
   'admin.kerberos.wizard.step3.header': 'Install and Test Kerberos Client',
@@ -991,16 +990,20 @@ Em.I18n.translations = {
   'admin.kerberos.wizard.step1.alert.body': 'Note: This process requires services to be restarted and cluster downtime. As well, depending on the options you select, might require support from your Security administrators. Please plan accordingly.',
   'admin.kerberos.wizard.step1.body.text': 'What type of KDC do you plan on using?',
   'admin.kerberos.wizard.step1.option.kdc': 'Existing MIT KDC',
-  'admin.kerberos.wizard.step1.option.kdc.condition.1': 'An administrative principal is created in the MIT KDC to be shared with Ambari when prompted.',
-  'admin.kerberos.wizard.step1.option.kdc.condition.2': 'Java Cryptography Extension (JCE) is installed on ambari server host.',
+  'admin.kerberos.wizard.step1.option.kdc.condition.1': 'Ambari Server and cluster hosts have network access to both the KDC and KDC admin hosts.',
+  'admin.kerberos.wizard.step1.option.kdc.condition.2': 'KDC administrative credentials are on-hand.',
+  'admin.kerberos.wizard.step1.option.kdc.condition.3': 'The Java Cryptography Extensions (JCE) have been setup on the Ambari Server host.',
   'admin.kerberos.wizard.step1.option.ad': 'Existing Active Directory',
-  'admin.kerberos.wizard.step1.option.ad.condition.1': 'An administrative principal is created in the Active Directory to be shared with Ambari when prompted.',
-  'admin.kerberos.wizard.step1.option.ad.condition.2': 'Java Cryptography Extension (JCE) is installed on ambari server host.',
+  'admin.kerberos.wizard.step1.option.ad.condition.1': 'Ambari Server and cluster hosts have network access to the Domain Controllers.',
+  'admin.kerberos.wizard.step1.option.ad.condition.2': 'Active Directory secure LDAP (LDAPS) connectivity has been configured.',
+  'admin.kerberos.wizard.step1.option.ad.condition.3': 'Active Directory User container for principals has been created and is on-hand (e.g. OU=Hadoop,OU=People,dc=apache,dc=org)',
+  'admin.kerberos.wizard.step1.option.ad.condition.4': 'Active Directory administrative credentials with delegated control of “Create, delete, and manage user accounts” on the previously mentioned User container are on-hand.',
+  'admin.kerberos.wizard.step1.option.ad.condition.5': 'The Java Cryptography Extensions (JCE) have been setup on the Ambari Server host.',
   'admin.kerberos.wizard.step1.prerequisites.label': 'Following prerequisites needs to be checked to progress ahead in the wizard.',
   'admin.kerberos.wizard.step2.info.body': 'Please configure kerberos related properties.',
   'admin.kerberos.wizard.step3.task0.title': 'Install Kerberos Client',
   'admin.kerberos.wizard.step3.task1.title': 'Test Kerberos Client',
-  'admin.kerberos.wizard.step3.notice.inProgress': 'Please wait while kerberos is being installed and tested.',
+  'admin.kerberos.wizard.step3.notice.inProgress': 'Please wait while the Kerberos clients are being installed and tested.',
   'admin.kerberos.wizard.step3.notice.completed': 'Kerberos service has been installed and tested successfully.',
   '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.',

http://git-wip-us.apache.org/repos/asf/ambari/blob/e44e73ed/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 dbfccf5..1ed0e8f 100644
--- a/ambari-web/app/routes/add_kerberos_routes.js
+++ b/ambari-web/app/routes/add_kerberos_routes.js
@@ -36,23 +36,30 @@ module.exports = App.WizardRoute.extend({
         onClose: function () {
           var self = this;
           switch(kerberosWizardController.get('currentStep')) {
-            case "1":
-              self.exitWizard();
-              break;
             case "2":
               var step2Controller = router.get('kerberosWizardStep2Controller');
               if (step2Controller.get('testConnectionInProgress')) {
                 step2Controller.showConnectionInProgressPopup(function() {
-                  self.exitWizard();
+                  kerberosWizardController.warnBeforeExitPopup(function() {
+                    self.exitWizard();
+                  }, false);
                 });
               } else {
-                self.exitWizard();
+                kerberosWizardController.warnBeforeExitPopup(function() {
+                  self.exitWizard();
+                }, false);
               }
               break;
+            case "6":
+            case "7":
+              kerberosWizardController.warnBeforeExitPopup(function() {
+                self.exitWizard();
+              }, true);
+              break;
             default:
               kerberosWizardController.warnBeforeExitPopup(function() {
                 self.exitWizard();
-              });
+              }, false);
           }
         },
         didInsertElement: function () {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e44e73ed/ambari-web/app/views/common/modal_popups/confirmation_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popups/confirmation_popup.js b/ambari-web/app/views/common/modal_popups/confirmation_popup.js
index 22830fb..fbcc882 100644
--- a/ambari-web/app/views/common/modal_popups/confirmation_popup.js
+++ b/ambari-web/app/views/common/modal_popups/confirmation_popup.js
@@ -26,9 +26,10 @@ var App = require('app');
  * @param {Function} secondary
  * @param {String} header
  * @param {String} primaryText
+ * @param {Boolean} isCritical
  * @return {*}
  */
-App.showConfirmationPopup = function (primary, body, secondary, header, primaryText) {
+App.showConfirmationPopup = function (primary, body, secondary, header, primaryText, isCritical) {
   if (!primary) {
     return false;
   }
@@ -37,6 +38,7 @@ App.showConfirmationPopup = function (primary, body, secondary, header, primaryT
     primary: primaryText || Em.I18n.t('ok'),
     header: header || Em.I18n.t('popup.confirmation.commonHeader'),
     body: body || Em.I18n.t('question.sure'),
+    primaryClass: isCritical ? 'btn-danger' : 'btn-success',
     onPrimary: function () {
       this.hide();
       primary();

http://git-wip-us.apache.org/repos/asf/ambari/blob/e44e73ed/ambari-web/test/controllers/main/admin/kerberos/kerberos_wizard_controler_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/kerberos/kerberos_wizard_controler_test.js b/ambari-web/test/controllers/main/admin/kerberos/kerberos_wizard_controler_test.js
index 4db54cb..c50a695 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/kerberos_wizard_controler_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/kerberos_wizard_controler_test.js
@@ -28,10 +28,16 @@ describe('App.KerberosWizardController', function() {
     afterEach(function () {
       App.showConfirmationPopup.restore();
     });
-    it('should open confirmation popup', function () {
+    it('should open warning confirmation popup', function () {
       var f = Em.K;
-      var popup = controller.warnBeforeExitPopup(f);
-      expect(App.showConfirmationPopup.calledWith(f, Em.I18n.t('admin.kerberos.wizard.exit.msg'), null, null, Em.I18n.t('common.exitAnyway'))).to.be.true;
+      var popup = controller.warnBeforeExitPopup(f, false);
+      expect(App.showConfirmationPopup.calledWith(f, Em.I18n.t('admin.kerberos.wizard.exit.warning.msg'), null, null, Em.I18n.t('common.exitAnyway'), false)).to.be.true;
+    });
+
+    it('should open critical confirmation popup', function () {
+      var f = Em.K;
+      var popup = controller.warnBeforeExitPopup(f, true);
+      expect(App.showConfirmationPopup.calledWith(f, Em.I18n.t('admin.kerberos.wizard.exit.critical.msg'), null, null, Em.I18n.t('common.exitAnyway'), true)).to.be.true;
     });
   });
 


[2/2] ambari git commit: AMBARI-9347 Kerberos Wizard: provide option to "Complete" in wizard. (ababiichuk)

Posted by ab...@apache.org.
AMBARI-9347 Kerberos Wizard: provide option to "Complete" in wizard. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: 7458ff226911a6987a397ce1bbe97b64768e4f70
Parents: e44e73e
Author: aBabiichuk <ab...@cybervisiontech.com>
Authored: Tue Jan 27 11:20:03 2015 +0200
Committer: aBabiichuk <ab...@cybervisiontech.com>
Committed: Tue Jan 27 11:20:03 2015 +0200

----------------------------------------------------------------------
 .../app/controllers/main/admin/kerberos/step7_controller.js  | 8 ++++++--
 ambari-web/app/messages.js                                   | 1 +
 ambari-web/app/views/main/admin/kerberos/step7_view.js       | 2 ++
 3 files changed, 9 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7458ff22/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js b/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
index 2cde092..af39815 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step7_controller.js
@@ -17,7 +17,7 @@
  */
 
 App.KerberosWizardStep7Controller = App.KerberosProgressPageController.extend({
-  name: 'kerberosWizardStep6Controller',
+  name: 'kerberosWizardStep7Controller',
   clusterDeployState: 'KERBEROS_DEPLOY',
   commands: ['startServices'],
 
@@ -35,5 +35,9 @@ App.KerberosWizardStep7Controller = App.KerberosProgressPageController.extend({
       success: 'startPolling',
       error: 'onTaskError'
     });
-  }
+  },
+
+  isSubmitDisabled: function () {
+    return !["COMPLETED", "FAILED"].contains(this.get('status'));
+  }.property('status')
 });
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/7458ff22/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index aa98f01..5a2a38d 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1014,6 +1014,7 @@ Em.I18n.translations = {
   'admin.kerberos.wizard.step6.notice.completed': 'Kerberos has successfully been enabled on the cluster.',
   'admin.kerberos.wizard.step7.notice.inProgress': 'Please wait while services are being started and tested.',
   'admin.kerberos.wizard.step7.notice.completed': 'Services have been successfully tested with kerberos environment.',
+  'admin.kerberos.wizard.step7.notice.failed': 'Some services failed to start and execute tests successfully. Click Retry to attempt again or click Complete to dismiss the wizard and fix manually.',
   'admin.kerberos.wizard.step7.task0.title' : 'Start and Test Services',
 
   'admin.highAvailability':' High Availability',

http://git-wip-us.apache.org/repos/asf/ambari/blob/7458ff22/ambari-web/app/views/main/admin/kerberos/step7_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/kerberos/step7_view.js b/ambari-web/app/views/main/admin/kerberos/step7_view.js
index 42426ea..e26cca2 100644
--- a/ambari-web/app/views/main/admin/kerberos/step7_view.js
+++ b/ambari-web/app/views/main/admin/kerberos/step7_view.js
@@ -23,6 +23,8 @@ App.KerberosWizardStep7View = App.KerberosProgressPageView.extend({
 
   noticeCompleted: Em.I18n.t('admin.kerberos.wizard.step7.notice.completed'),
 
+  noticeFailed: Em.I18n.t('admin.kerberos.wizard.step7.notice.failed'),
+
   submitButtonText: Em.I18n.t('common.complete'),
 
   showBackButton: false