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-14358. On Add service wizard, Ranger Admin Tab shows red badge for unknown property. (Jaimin Jetly)
Date Sun, 13 Dec 2015 22:25:22 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 7edea1cda -> f4325f441


AMBARI-14358. On Add service wizard, Ranger Admin Tab shows red badge for unknown property.
(Jaimin Jetly)


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

Branch: refs/heads/trunk
Commit: f4325f4411f7710137aa2f9a3a9a13b79a676652
Parents: 7edea1c
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Sun Dec 13 14:24:56 2015 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Sun Dec 13 14:25:18 2015 -0800

----------------------------------------------------------------------
 .../app/models/configs/objects/service_config_property.js   | 2 +-
 .../models/configs/objects/service_config_property_test.js  | 9 +++++++++
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4325f44/ambari-web/app/models/configs/objects/service_config_property.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/models/configs/objects/service_config_property.js b/ambari-web/app/models/configs/objects/service_config_property.js
index 3b2b531..feeb976 100644
--- a/ambari-web/app/models/configs/objects/service_config_property.js
+++ b/ambari-web/app/models/configs/objects/service_config_property.js
@@ -330,7 +330,7 @@ App.ServiceConfigProperty = Em.Object.extend({
     var isWarn = false;
 
     if (typeof value === 'string' && value.length === 0) {
-      if (this.get('isRequired')) {
+      if (this.get('isRequired') && this.get('widgetType') != 'test-db-connection')
{
         this.set('errorMessage', 'This is required');
         isError = true;
       } else {

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4325f44/ambari-web/test/models/configs/objects/service_config_property_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/models/configs/objects/service_config_property_test.js b/ambari-web/test/models/configs/objects/service_config_property_test.js
index e292109..346367f 100644
--- a/ambari-web/test/models/configs/objects/service_config_property_test.js
+++ b/ambari-web/test/models/configs/objects/service_config_property_test.js
@@ -473,6 +473,15 @@ describe('App.ServiceConfigProperty', function () {
       expect(serviceConfigProperty.get('errorMessage')).to.be.empty;
       expect(serviceConfigProperty.get('error')).to.be.false;
     });
+    it('test-db-connection widget', function () {
+      serviceConfigProperty.setProperties({
+        isRequired: true,
+        widgetType: 'test-db-connection',
+        value: ''
+      });
+      expect(serviceConfigProperty.get('errorMessage')).to.be.empty;
+      expect(serviceConfigProperty.get('error')).to.be.false;
+    });
     it('should validate', function () {
       serviceConfigProperty.setProperties({
         isRequired: true,


Mime
View raw message