ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhangqi...@apache.org
Subject ranger git commit: RANGER-2177: Handle validations for duplicate configuration item during service create/edit
Date Mon, 13 Aug 2018 05:35:09 GMT
Repository: ranger
Updated Branches:
  refs/heads/master 49142eb1b -> 0db2e80b4


RANGER-2177: Handle validations for duplicate configuration item during service create/edit

Signed-off-by: zhangqiang2 <zhangqiang2@zte.com.cn>


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

Branch: refs/heads/master
Commit: 0db2e80b4de5eb134d2a33ac13c1a648ca113d10
Parents: 49142eb
Author: xingpeng1 <xing.peng1@zte.com.cn>
Authored: Fri Aug 10 11:08:19 2018 +0800
Committer: zhangqiang2 <zhangqiang2@zte.com.cn>
Committed: Mon Aug 13 13:34:26 2018 +0800

----------------------------------------------------------------------
 .../src/main/webapp/scripts/views/service/ServiceForm.js    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/0db2e80b/security-admin/src/main/webapp/scripts/views/service/ServiceForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/service/ServiceForm.js b/security-admin/src/main/webapp/scripts/views/service/ServiceForm.js
index 726fb5f..b7215f2 100644
--- a/security-admin/src/main/webapp/scripts/views/service/ServiceForm.js
+++ b/security-admin/src/main/webapp/scripts/views/service/ServiceForm.js
@@ -145,19 +145,22 @@ define(function(require){
 		formValidation : function(){
 			var valid = true;
 			var config = {};
-			this.extraConfigColl.each(function(obj){
+
+			for (var i = 0; i < this.extraConfigColl.length; i++) {
+				var obj = this.extraConfigColl.at(i);
 				if(!_.isEmpty(obj.attributes)) {
 					if (!_.isUndefined(config[obj.get('name')])) {
 						XAUtil.alertPopup({
 							msg : localization.tt('msg.duplicateNewConfigValidationMsg')
 						});
 						valid = false;
-						return;
+						break;
 					} else {
 						config[obj.get('name')] = obj.get('value');
 					}
 				}
-			});
+			}
+
 			return valid;
 		},
 


Mime
View raw message