ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-17038. Enable kerberos wizard UI showing incorrect total of required fields. (jaimin)
Date Sat, 04 Jun 2016 00:11:56 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7a030d752 -> 2f7beef82


AMBARI-17038. Enable kerberos wizard UI showing incorrect total of required fields. (jaimin)


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

Branch: refs/heads/trunk
Commit: 2f7beef8296a3757c6dcc2b15ceaa0f31bf61cfe
Parents: 7a030d7
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Fri Jun 3 16:53:31 2016 -0700
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Fri Jun 3 17:12:42 2016 -0700

----------------------------------------------------------------------
 .../app/models/configs/objects/service_config.js     |  2 +-
 .../models/configs/objects/service_config_test.js    | 15 ++++++++++++---
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/2f7beef8/ambari-web/app/models/configs/objects/service_config.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config.js b/ambari-web/app/models/configs/objects/service_config.js
index 088d51e..35ffa99 100644
--- a/ambari-web/app/models/configs/objects/service_config.js
+++ b/ambari-web/app/models/configs/objects/service_config.js
@@ -46,7 +46,7 @@ App.ServiceConfig = Ember.Object.extend({
    */
   activeProperties: function() {
     return this.get('configs').filter(function(c) {
-      return c.get('isVisible') && !c.get('hiddenBySection') && c.get('isRequiredByAgent');
+      return c.get('isVisible') && !c.get('hiddenBySection') && (c.get('isRequiredByAgent')
|| c.get('isRequired'));
     });
   }.property('configs.@each.isVisible', 'configs.@each.hiddenBySection', 'configs.@each.isRequiredByAgent'),
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/2f7beef8/ambari-web/test/models/configs/objects/service_config_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/configs/objects/service_config_test.js b/ambari-web/test/models/configs/objects/service_config_test.js
index 70cf37b..bb7f87c 100644
--- a/ambari-web/test/models/configs/objects/service_config_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_test.js
@@ -69,6 +69,15 @@ var serviceConfig,
       'isRequiredByAgent': false,
       'isValid': true,
       'isValidOverride': false
+    }),
+    Em.Object.create({
+      'name': 'p7',
+      'isVisible': true,
+      'hiddenBySection': false,
+      'isRequiredByAgent': false,
+      'isValid': true,
+      'isRequired': true,
+      'isValidOverride': false
     })
   ];
 
@@ -82,14 +91,14 @@ describe('App.ServiceConfig', function () {
 
   describe('#activeProperties', function() {
     it('returns collection of properties that should be shown', function() {
-      expect(serviceConfig.get('activeProperties').mapProperty('name')).to.be.eql(['p1','p4','p5']);
+      expect(serviceConfig.get('activeProperties').mapProperty('name')).to.be.eql(['p1','p4','p5','p7']);
     });
   });
 
   describe('#configsWithErrors', function() {
     it('returns collection of properties with errors', function() {
-      expect(serviceConfig.get('configsWithErrors').mapProperty('name')).to.be.eql(['p4',
'p5']);
-    })
+      expect(serviceConfig.get('configsWithErrors').mapProperty('name')).to.be.eql(['p4',
'p5', 'p7']);
+    });
   });
 
   describe('#errorCount', function() {


Mime
View raw message