ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sangee...@apache.org
Subject ambari git commit: AMBARI-18926 - Kerberos Wizard UI creates duplicate radio buttons for FreeIPA (Jesus Alvarez via sangeetar)
Date Thu, 08 Dec 2016 23:33:10 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 647c6f27e -> da2228fb3


AMBARI-18926 - Kerberos Wizard UI creates duplicate radio buttons for FreeIPA (Jesus Alvarez
via sangeetar)


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

Branch: refs/heads/trunk
Commit: da2228fb3fe10c485ba374030eef85151cf8565d
Parents: 647c6f2
Author: Sangeeta Ravindran <sangeetar@apache.org>
Authored: Thu Dec 8 15:32:26 2016 -0800
Committer: Sangeeta Ravindran <sangeetar@apache.org>
Committed: Thu Dec 8 15:32:40 2016 -0800

----------------------------------------------------------------------
 .../app/controllers/main/admin/kerberos/step1_controller.js     | 5 +++--
 .../controllers/main/admin/kerberos/step1_controller_test.js    | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/da2228fb/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 2feeb7f..c0decfc 100644
--- a/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
+++ b/ambari-web/app/controllers/main/admin/kerberos/step1_controller.js
@@ -138,8 +138,9 @@ App.KerberosWizardStep1Controller = Em.Controller.extend({
     if (App.get('supports.enableIpa')) {
       var ipaOption = this.get('ipaOption');
       var options = this.get('options');
-
-      options.pushObject(ipaOption);
+      if (options.indexOf(ipaOption) === -1){
+        options.pushObject(ipaOption);
+      }
     }
   },
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/da2228fb/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js b/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
index 9280367f..f3f05a4 100644
--- a/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
+++ b/ambari-web/test/controllers/main/admin/kerberos/step1_controller_test.js
@@ -51,6 +51,9 @@ describe('App.KerberosWizardStep1Controller', function() {
       controller.loadStep();
       expect(controller.get('selectedItem')).to.be.equal(Em.I18n.t('admin.kerberos.wizard.step1.option.kdc'));
       expect(controller.get('options')).to.not.be.empty;
+      controller.loadStep();
+      var options = controller.get('options');
+      expect(options.length == 1).to.be.true;
     });
 
     it("enableIpa is false", function() {


Mime
View raw message