You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2016/06/04 00:11:04 UTC

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

Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 b54ca2f9e -> 735f68d35


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/735f68d3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/735f68d3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/735f68d3

Branch: refs/heads/branch-2.4
Commit: 735f68d35705211bce074515475e0941bb1b19ed
Parents: b54ca2f
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Fri Jun 3 16:53:31 2016 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Fri Jun 3 16:53:31 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/735f68d3/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/735f68d3/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() {