ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gau...@apache.org
Subject [5/5] incubator-ranger git commit: RANGER-760 : Various Ranger UI code clean up
Date Tue, 02 Feb 2016 06:06:11 GMT
RANGER-760 : Various Ranger UI code clean up


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

Branch: refs/heads/master
Commit: 018644b9451b2b57b949ac3aae3f14910f2c4fb7
Parents: de9327d
Author: Gautam Borad <gautam@apache.org>
Authored: Fri Nov 27 11:29:57 2015 +0530
Committer: Gautam Borad <gautam@apache.org>
Committed: Tue Feb 2 11:35:47 2016 +0530

----------------------------------------------------------------------
 security-admin/src/main/webapp/ajax_failure.jsp |  31 --
 .../src/main/webapp/ajax_success.html           |  26 --
 .../src/main/webapp/images/data-grey.png        | Bin 1468 -> 0 bytes
 .../main/webapp/images/database_table_32.png    | Bin 1329 -> 0 bytes
 .../src/main/webapp/images/folder.png           | Bin 920 -> 0 bytes
 .../src/main/webapp/images/folder2.png          | Bin 946 -> 0 bytes
 security-admin/src/main/webapp/images/hbase.jpg | Bin 4575 -> 0 bytes
 security-admin/src/main/webapp/images/hdfs.jpg  | Bin 5232 -> 0 bytes
 security-admin/src/main/webapp/images/hive.png  | Bin 20483 -> 0 bytes
 security-admin/src/main/webapp/images/hline.png | Bin 99 -> 0 bytes
 security-admin/src/main/webapp/images/knox.gif  | Bin 2347 -> 0 bytes
 security-admin/src/main/webapp/images/knox1.png | Bin 34126 -> 0 bytes
 .../src/main/webapp/images/router-grey.png      | Bin 1533 -> 0 bytes
 security-admin/src/main/webapp/images/storm.png | Bin 6174 -> 0 bytes
 .../src/main/webapp/images/storm1.png           | Bin 19620 -> 0 bytes
 .../src/main/webapp/images/task-grey.png        | Bin 1187 -> 0 bytes
 security-admin/src/main/webapp/index.html       |   5 -
 security-admin/src/main/webapp/login.jsp        |  17 -
 .../collection_bases/VXAuditRecordListBase.js   |  60 ---
 .../scripts/collections/VXAuditRecordList.js    |  36 --
 .../webapp/scripts/controllers/Controller.js    |  23 +-
 .../scripts/model_bases/VXAuditRecordBase.js    | 106 -----
 .../main/webapp/scripts/models/VXAuditRecord.js |  80 ----
 .../src/main/webapp/scripts/models/VXGroup.js   |  13 +-
 .../main/webapp/scripts/models/VXPortalUser.js  |   2 +-
 .../scripts/modules/globalize/message/en.js     |   8 +-
 .../scripts/views/accounts/AccountCreate.js     | 133 ------
 .../views/accounts/AccountDetailLayout.js       |  90 ----
 .../scripts/views/accounts/AccountForm.js       |  86 ----
 .../views/accounts/AccountTableLayout.js        | 194 ---------
 .../webapp/scripts/views/common/AddGroup.js     |  80 ++--
 .../webapp/scripts/views/common/BreadCrumbs.js  |  18 +-
 .../scripts/views/common/FormInputItemList.js   | 426 -------------------
 .../main/webapp/scripts/views/common/TopNav.js  |   2 +-
 .../scripts/views/common/UserPermissionList.js  | 124 ++----
 .../webapp/scripts/views/common/XABackgrid.js   |  20 +-
 .../scripts/views/common/XATableLayout.js       |  10 +-
 .../webapp/scripts/views/folders/FolderInfo.js  | 173 --------
 .../webapp/scripts/views/kms/KMSTableLayout.js  |  44 +-
 .../webapp/scripts/views/kms/KmsKeyCreate.js    |  13 +-
 .../views/permissions/ModulePermissionCreate.js |  93 ++--
 .../views/permissions/ModulePermissionForm.js   |  49 +--
 .../views/permissions/ModulePermsTableLayout.js |  44 +-
 .../scripts/views/policies/PermissionList.js    |  81 ++--
 .../views/policies/RangerPolicyCreate.js        |  44 +-
 .../views/policies/RangerPolicyTableLayout.js   |   1 -
 .../views/policymanager/ServiceLayout.js        |   9 +-
 .../webapp/scripts/views/reports/AuditLayout.js | 244 +++++------
 .../scripts/views/reports/LoginSessionDetail.js |   3 -
 .../views/reports/OperationDiffDetail.js        |  57 ++-
 .../views/reports/PlugableServiceDiffDetail.js  |  17 +-
 .../scripts/views/reports/UserAccessLayout.js   |  43 +-
 .../scripts/views/service/ConfigurationList.js  |   8 +-
 .../scripts/views/service/ServiceCreate.js      |  31 +-
 .../webapp/scripts/views/service/ServiceForm.js |  26 +-
 .../scripts/views/service/ServiceTableLayout.js | 164 -------
 .../webapp/scripts/views/user/UserProfile.js    |  31 +-
 .../scripts/views/user/UserProfileForm.js       |  21 +-
 .../webapp/scripts/views/users/GroupCreate.js   |  20 +-
 .../webapp/scripts/views/users/UserCreate.js    |  38 +-
 .../main/webapp/scripts/views/users/UserForm.js |  23 +-
 .../scripts/views/users/UserTableLayout.js      |  38 +-
 .../templates/accounts/AccountCreate_tmpl.html  |  28 --
 .../accounts/AccountDetailLayout_tmpl.html      |  88 ----
 .../templates/accounts/AccountForm_tmpl.html    |  23 -
 .../accounts/AccountTableLayout_tmpl.html       |  31 --
 .../templates/asset/AssetCreate_tmpl.html       |  36 --
 .../webapp/templates/asset/AssetForm_tmpl.html  |  69 ---
 .../templates/asset/AssetTableLayout_tmpl.html  |  29 --
 .../webapp/templates/common/Footer_tmpl.html    |  14 -
 .../common/PolicyManagerLayout_tmpl.html        | 274 ------------
 .../templates/common/ProfileBar_tmpl.html       |  37 --
 .../webapp/templates/common/TopNav_tmpl.html    |   1 -
 .../templates/common/UserPermissionList.html    |   1 -
 .../webapp/templates/common/breadcrumbs.html    |  16 -
 .../webapp/templates/common/formInputItem.html  |  54 ---
 .../templates/common/formInputItemList.html     |  42 --
 .../templates/folders/FolderInfo_tmpl.html      | 134 ------
 .../templates/hbase/HbasePolicyCreate_tmpl.html |  48 ---
 .../templates/hbase/HbasePolicyForm_tmpl.html   |  56 ---
 .../templates/hbase/HbaseTableLayout_tmpl.html  |  41 --
 .../templates/hdfs/HDFSTableLayout_tmpl.html    |  41 --
 .../templates/hdfs/PolicyCreate_tmpl.html       |  48 ---
 .../webapp/templates/hdfs/PolicyForm_tmpl.html  |  61 ---
 .../main/webapp/templates/helpers/XAHelpers.js  |  58 ++-
 .../templates/hive/HivePolicyCreate_tmpl.html   |  49 ---
 .../templates/hive/HivePolicyForm_tmpl.html     |  67 ---
 .../templates/hive/HiveTableLayout_tmpl.html    |  41 --
 .../webapp/templates/kms/KmsKeyCreate_tmpl.html |   1 -
 .../templates/kms/KmsTableLayout_tmpl.html      |   9 -
 .../webapp/templates/knox/KnoxInfo_tmpl.html    | 106 -----
 .../templates/knox/KnoxPolicyCreate_tmpl.html   |  49 ---
 .../templates/knox/KnoxPolicyForm_tmpl.html     |  55 ---
 .../templates/knox/KnoxTableLayout_tmpl.html    |  41 --
 .../templates/license/LicenseCreate_tmpl.html   |  47 --
 .../templates/license/LicenseInfo_tmpl.html     |  59 ---
 .../permissions/ModulePermissionForm_tmpl.html  |   2 -
 .../templates/policies/PermissionList.html      |   1 -
 .../templates/reports/AuditLayout_tmpl.html     |   2 -
 .../KnoxPolicyDeleteOperationDiff_tmpl.html     |   1 -
 .../reports/KnoxPolicyOperationDiff_tmpl.html   |   1 -
 .../KnoxPolicyUpdateOperationDiff_tmpl.html     |   2 -
 .../reports/LoginSessionDetail_tmpl.html        |   1 -
 .../PlugableServicePolicyDeleteDiff_tmpl.html   |   1 -
 .../PlugableServicePolicyUpdateDiff_tmpl.html   |   1 -
 .../reports/PolicyDeleteOperationDiff_tmpl.html |   1 -
 .../reports/PolicyOperationDiff_tmpl.html       |   1 -
 .../reports/PolicyUpdateOperationDiff_tmpl.html |   3 -
 .../reports/UserAccessLayout_tmpl.html          |  23 +-
 .../reports/UserUpdateOperationDiff_tmpl.html   |   2 -
 .../service/ConfigurationList_tmpl.html         |   3 -
 .../templates/service/ServiceCreate_tmpl.html   |   2 +-
 .../templates/storm/StormPolicyCreate_tmpl.html |  49 ---
 .../templates/storm/StormPolicyForm_tmpl.html   |  55 ---
 .../templates/storm/StormTableLayout_tmpl.html  |  41 --
 .../templates/user/UserProfileForm_tmpl.html    |  12 -
 .../main/webapp/themejs/1.3.0/bootstrap.min.js  |   1 -
 117 files changed, 530 insertions(+), 4334 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/ajax_failure.jsp
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/ajax_failure.jsp b/security-admin/src/main/webapp/ajax_failure.jsp
deleted file mode 100644
index b48064c..0000000
--- a/security-admin/src/main/webapp/ajax_failure.jsp
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<%
-	int ajaxReturnCode = 401;
-	//PropertiesUtil.getIntProperty("ranger.ajax.auth.required.code", 401);
-	response.sendError(ajaxReturnCode);
-%>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Insert title here</title>
-</head>
-<body>
-Failure
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/ajax_success.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/ajax_success.html b/security-admin/src/main/webapp/ajax_success.html
deleted file mode 100644
index 52023ca..0000000
--- a/security-admin/src/main/webapp/ajax_success.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Insert title here</title>
-</head>
-<body>
-Success
-</body>
-</html>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/data-grey.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/data-grey.png b/security-admin/src/main/webapp/images/data-grey.png
deleted file mode 100644
index dabec13..0000000
Binary files a/security-admin/src/main/webapp/images/data-grey.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/database_table_32.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/database_table_32.png b/security-admin/src/main/webapp/images/database_table_32.png
deleted file mode 100644
index 14bb068..0000000
Binary files a/security-admin/src/main/webapp/images/database_table_32.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/folder.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/folder.png b/security-admin/src/main/webapp/images/folder.png
deleted file mode 100644
index 0613c6b..0000000
Binary files a/security-admin/src/main/webapp/images/folder.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/folder2.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/folder2.png b/security-admin/src/main/webapp/images/folder2.png
deleted file mode 100644
index 85da97f..0000000
Binary files a/security-admin/src/main/webapp/images/folder2.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/hbase.jpg
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/hbase.jpg b/security-admin/src/main/webapp/images/hbase.jpg
deleted file mode 100644
index 27c177a..0000000
Binary files a/security-admin/src/main/webapp/images/hbase.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/hdfs.jpg
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/hdfs.jpg b/security-admin/src/main/webapp/images/hdfs.jpg
deleted file mode 100644
index 2f6dad2..0000000
Binary files a/security-admin/src/main/webapp/images/hdfs.jpg and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/hive.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/hive.png b/security-admin/src/main/webapp/images/hive.png
deleted file mode 100644
index b7939b1..0000000
Binary files a/security-admin/src/main/webapp/images/hive.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/hline.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/hline.png b/security-admin/src/main/webapp/images/hline.png
deleted file mode 100644
index b488b95..0000000
Binary files a/security-admin/src/main/webapp/images/hline.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/knox.gif
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/knox.gif b/security-admin/src/main/webapp/images/knox.gif
deleted file mode 100644
index 3edc8fd..0000000
Binary files a/security-admin/src/main/webapp/images/knox.gif and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/knox1.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/knox1.png b/security-admin/src/main/webapp/images/knox1.png
deleted file mode 100644
index 56265c7..0000000
Binary files a/security-admin/src/main/webapp/images/knox1.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/router-grey.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/router-grey.png b/security-admin/src/main/webapp/images/router-grey.png
deleted file mode 100644
index 5424139..0000000
Binary files a/security-admin/src/main/webapp/images/router-grey.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/storm.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/storm.png b/security-admin/src/main/webapp/images/storm.png
deleted file mode 100644
index 510cc92..0000000
Binary files a/security-admin/src/main/webapp/images/storm.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/storm1.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/storm1.png b/security-admin/src/main/webapp/images/storm1.png
deleted file mode 100644
index a5b36c7..0000000
Binary files a/security-admin/src/main/webapp/images/storm1.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/images/task-grey.png
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/images/task-grey.png b/security-admin/src/main/webapp/images/task-grey.png
deleted file mode 100644
index 6c76084..0000000
Binary files a/security-admin/src/main/webapp/images/task-grey.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/index.html b/security-admin/src/main/webapp/index.html
index f1d0b75..31833b6 100644
--- a/security-admin/src/main/webapp/index.html
+++ b/security-admin/src/main/webapp/index.html
@@ -75,12 +75,7 @@
 			</section>
 			<div class='notifications top-right ranger-notifications'></div>
 			<section id="r_content" class="row-fluid" style="min-height: 450px;">
-
-
-				<!-- <img src="images/loading-blue.gif" style="margin-left: 43%;margin-top: 1%;width:4%;" /> -->
-
 				<div class="loading-img">
-
 					<div id="center">
 						<div class="letter_container_1">
 							<span>L</span>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/login.jsp
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/login.jsp b/security-admin/src/main/webapp/login.jsp
index 0db6882..39fb327 100644
--- a/security-admin/src/main/webapp/login.jsp
+++ b/security-admin/src/main/webapp/login.jsp
@@ -38,11 +38,6 @@
 
 		<script type="text/javascript">
 			$(document).ready(function() {
-				/*  $('#signin-container').submit(function() {
-					document.location = 'dashboard.html';
-					return false;
-				}); */ 
-
 				var updateBoxPosition = function() {
 					$('#signin-container').css({
 						'margin-top' : ($(window).height() - $('#signin-container').height()) / 2
@@ -80,22 +75,10 @@
 					</span>
 					<button type="submit" class="btn btn-primary btn-block" id="signIn" tabindex="4" >
 						Sign In
-						<!--<img id="signInLoading" src="images/loading.gif" style="visibility: hidden;" /> -->
 						<i id="signInLoading" class="icon-spinner icon-spin pull-right icon-sign-in"></i>
 					</button>
 				</fieldset>
 			</form>
-			<!-- <div class="social">
-				<p>
-					...or sign in with
-				</p>
-
-				<a href="javascript:void(0);" title="" tabindex="5" class="twitter"> <i class="icon-twitter"></i> </a>
-
-				<a href="javascript:void(0);" title="" tabindex="6" class="facebook"> <i class="icon-facebook"></i> </a>
-
-				<a href="javascript:void(0);" title="" tabindex="7" class="google"> <i class="icon-google-plus"></i> </a>
-			</div> -->
 		</section>
 
 	</body>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/collection_bases/VXAuditRecordListBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/collection_bases/VXAuditRecordListBase.js b/security-admin/src/main/webapp/scripts/collection_bases/VXAuditRecordListBase.js
deleted file mode 100644
index 1cd1fb1..0000000
--- a/security-admin/src/main/webapp/scripts/collection_bases/VXAuditRecordListBase.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require){
-	'use strict';	
-
-	var XABaseCollection	= require('collections/XABaseCollection');
-	var XAGlobals			= require('utils/XAGlobals');
-	var VXAuditRecord		= require('models/VXAuditRecord');
-
-	var VXAuditRecordListBase = XABaseCollection.extend(
-	/** @lends VXAuditRecordListBase.prototype */
-	{
-		url: XAGlobals.baseURL + 'assets/audit/report',
-
-		model : VXAuditRecord,
-
-		/**
-		 * VXAuditRecordListBase initialize method
-		 * @augments XABaseCollection
-		 * @constructs
-		 */
-		initialize : function() {
-			this.modelName = 'VXAuditRecord';
-			this.modelAttrName = 'vXAuditRecords';
-			this.bindErrorEvents();
-		}
-	},{
-		// static class members
-		/**
-		* Table Cols to be passed to Backgrid
-		* UI has to use this as base and extend this.
-		*
-		*/
-
-		tableCols : {}
-
-	});
-
-    return VXAuditRecordListBase;
-});
-
-

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/collections/VXAuditRecordList.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/collections/VXAuditRecordList.js b/security-admin/src/main/webapp/scripts/collections/VXAuditRecordList.js
deleted file mode 100644
index 09c434a..0000000
--- a/security-admin/src/main/webapp/scripts/collections/VXAuditRecordList.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require){
-	'use strict';	
-
-	var VXAuditRecordListBase		= require('collection_bases/VXAuditRecordListBase');
-
-	var VXAuditRecordList = VXAuditRecordListBase.extend(
-	/** @lends VXAuditRecordList.prototype */
-	{
-	},{
-		// static class members
-	});
-
-    return VXAuditRecordList;
-});
-
-

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/controllers/Controller.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/controllers/Controller.js b/security-admin/src/main/webapp/scripts/controllers/Controller.js
index ef12818..1ac58cf 100755
--- a/security-admin/src/main/webapp/scripts/controllers/Controller.js
+++ b/security-admin/src/main/webapp/scripts/controllers/Controller.js
@@ -62,12 +62,7 @@ define(function(require) {
 		   var RangerPolicyList 	= require('collections/RangerPolicyList');
 		   var VXGroupList		= require('collections/VXGroupList');
 		   var VXUserList		= require('collections/VXUserList');
-		   var policyList 	= new RangerPolicyList([],{
-			   queryParams : {
-				   //'resourceType' : XAEnums.AssetType.ASSET_HDFS.value,
-				   //'assetId' : assetId 
-			   }
-		   });
+		   var policyList 	= new RangerPolicyList();
 		   var that 		= this;
 		   this.groupList 	= new VXGroupList();
 		   this.userList 	= new VXUserList();
@@ -416,22 +411,6 @@ define(function(require) {
 			   kmsServiceName : kmsServiceName
 		   }));
 	   },
-//	   kmsKeyEditAction : function(kmsServiceName, keyName){
-//		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.KMS.value });
-//		   var view 		= require('views/kms/KmsKeyCreate');
-//		   var VXKmsKey		= require('models/VXKmsKey');
-//		   var kmsKeyModel 	= new VXKmsKey({'name' : keyName});
-//		   var data = {'provider': kmsServiceName}
-//		   kmsKeyModel.fetch({
-//				   cache : true,
-//				   data : data
-//		   }).done(function(){
-//			   App.rContent.show(new view({
-//				   model : kmsKeyModel,
-//				   kmsServiceName : kmsServiceName
-//			   }));
-//		   });	   
-//	   },
 	   /**************** ERROR PAGE ******************************/
 	   pageNotFoundAction	: function() {
 		   var XAUtils			= require('utils/XAUtils');

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/model_bases/VXAuditRecordBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXAuditRecordBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXAuditRecordBase.js
deleted file mode 100644
index fb1e8fb..0000000
--- a/security-admin/src/main/webapp/scripts/model_bases/VXAuditRecordBase.js
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require){
-	'use strict';	
-
-	var XABaseModel	= require('models/XABaseModel');
-	var XAGlobals	= require('utils/XAGlobals');
-
-	var VXAuditRecordBase = XABaseModel.extend(
-	/** @lends VXAuditRecordBase.prototype */
-	{
-		urlRoot: XAGlobals.baseURL + 'assets/audit/report',
-		
-		defaults: {},
-
-		serverSchema : {
-			"id" : {
-				"dataType" : "Long"
-			},
-			"version" : {
-				"dataType" : "int"
-			},
-			"createDate" : {
-				"dataType" : "Date"
-			},
-			"updateDate" : {
-				"dataType" : "Date"
-			},
-			"permList" : {
-				"dataType" : "list",
-				"listType" : "VNameValue"
-			},
-			"forUserId" : {
-				"dataType" : "Long"
-			},
-			"status" : {
-				"dataType" : "int"
-			},
-			"priGrpId" : {
-				"dataType" : "Long"
-			},
-			"updatedBy" : {
-				"dataType" : "String"
-			},
-			"isSystem" : {
-				"dataType" : "boolean"
-			},
-			"date" : {
-				"dataType" : "Date"
-			},
-			"resource" : {
-				"dataType" : "String"
-			},
-			"action" : {
-				"dataType" : "String"
-			},
-			"result" : {
-				"dataType" : "String"
-			},
-			"user" : {
-				"dataType" : "String"
-			},
-			"enforcer" : {
-				"dataType" : "String"
-			}
-		},
-		
-		
-		idAttribute: 'id',
-
-		/**
-		 * VXAuditRecordBase initialize method
-		 * @augments XABaseModel
-		 * @constructs
-		 */
-		initialize: function() {
-			this.modelName = 'VXAuditRecordBase';
-		}
-
-	}, {
-		// static class members
-	});
-
-    return VXAuditRecordBase;
-	
-});
-
-

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/models/VXAuditRecord.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXAuditRecord.js b/security-admin/src/main/webapp/scripts/models/VXAuditRecord.js
deleted file mode 100644
index 0e89a7f..0000000
--- a/security-admin/src/main/webapp/scripts/models/VXAuditRecord.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require){
-	'use strict';	
-
-	var VXAuditRecordBase	= require('model_bases/VXAuditRecordBase');
-
-	var VXAuditRecord = VXAuditRecordBase.extend(
-	/** @lends VXAuditRecord.prototype */
-	{
-		/**
-		 * @function schema
-		 * This method is meant to be used by UI,
-		 * by default we will remove the unrequired attributes from serverSchema
-		 */
-
-		schemaBase : function(){
-			var attrs = _.omit(this.serverSchema, 'id', 'createDate', 'updateDate', "version",
-					"createDate", "updateDate", "displayOption",
-					"permList", "forUserId", "status", "priGrpId",
-					"updatedBy","isSystem");
-
-			_.each(attrs, function(o){
-				o.type = 'Hidden';
-			});
-
-			// Overwrite your schema definition here
-			return _.extend(attrs,{
-				/*name : {
-					type		: 'Text',
-					title		: 'Folder Name *',
-					validators	: ['required'],
-				},*/
-
-			});
-		},
-
-		/*links : {
-			detail: {
-				href: 'javascript:void(0)',
-				label : this.toString()
-			},
-			list: {
-				href: 'javascript:void(0)',
-				label : this.toString()
-			},
-		},*/
-		
-		/** This models toString() */
-		toString : function(){
-			return /*this.get('name')*/;
-		}
-
-	}, {
-		// static class members
-	});
-
-    return VXAuditRecord;
-	
-});
-
-

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/models/VXGroup.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXGroup.js b/security-admin/src/main/webapp/scripts/models/VXGroup.js
index 3aa3615..5818f43 100644
--- a/security-admin/src/main/webapp/scripts/models/VXGroup.js
+++ b/security-admin/src/main/webapp/scripts/models/VXGroup.js
@@ -69,7 +69,7 @@ define(function(require){
 				name : {
 					type		: 'Text',
 					title		: localization.tt("lbl.groupName") +' *',
-					validators  : ['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9_'&-]*[A-Za-z0-9]$/i,message :'Please enter valid name.'}],
+					validators  : ['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9_'&-]*[A-Za-z0-9]$/i,message :'Name must start with alphabet and must end with alphabet or number and must have atleast two chars.Allowed special characters _ ,\' ,& ,-'}],
 					editorAttrs 	:{ 'maxlength': 32},
 				},
 				description : {
@@ -78,17 +78,6 @@ define(function(require){
 				}
 			});	
 		},
-
-		/*links : {
-			detail: {
-				href: 'javascript:void(0)',
-				label : this.toString()
-			},
-			list: {
-				href: 'javascript:void(0)',
-				label : this.toString()
-			},
-		},*/
 		
 		/** This models toString() */
 		toString : function(){

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXPortalUser.js b/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
index 079fc9c..cc1ee82 100644
--- a/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
+++ b/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
@@ -57,7 +57,7 @@ define(function(require){
 				lastName : {
 					type		: 'Text',
 					title		: localization.tt("lbl.lastName")+' *',
-					validators  : [{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_-]*[a-zA-Z0-9]+$/,message :'Last name should start with alphabets & can have underscore, hyphen, space.'}],
+					validators  : ['required',{type:'regexp',regexp:/^[a-zA-Z][a-zA-Z0-9\s_-]*[a-zA-Z0-9]+$/,message :'Last name should start with alphabets & can have underscore, hyphen, space.'}],
 					editorAttrs : { 'placeholder' : localization.tt("lbl.lastName")}
 				},
 				emailAddress : {

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
index 457b7e8..604c6be 100644
--- a/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
+++ b/security-admin/src/main/webapp/scripts/modules/globalize/message/en.js
@@ -316,8 +316,8 @@ define(function(require) {
 				youDontHavePermission 	  : 'You don\'t have permission for the resource !!',
 				myProfileError			  :'Your password does not match. Please try again with proper password',
 				myProfileSuccess		  :'Profile Edited successfully',
-				userNameAlreadyExist		  : 'User name already exists',
-				groupNameAlreadyExist		  : 'Group name already exists',
+				userNameAlreadyExist	  : 'User name already exists',
+				groupNameAlreadyExist	  : 'Group name already exists',
 				yourAuditLogginIsOff 	  :'You must have at least one or more user/group access defined for the policy.',
 				policyNotHavingPerm		  : 'The policy does not have any permissions so audit logging cannot be turned off',
 				areSureWantToLogout		  : 'Are you sure want to logout ?',
@@ -330,6 +330,10 @@ define(function(require) {
 				rolloverSuccessfully	  : 'Key rollover successfully',
 				addUserOrGroup			  : 'Please select group/user for the selected permission, else group/user will not be added.',
 				addUserOrGroupForPC		  : 'Please select group/user for the added policy condition, else group/user will not be added.',
+				userCreatedSucc		      : 'User created successfully',
+				userUpdatedSucc           :     'User updated successfully',
+				grpUpdatedSucc            : 'Group updated successfully',
+				grpCreatedSucc            : 'Group created successfully',
 				
 				
 				

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/accounts/AccountCreate.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/accounts/AccountCreate.js b/security-admin/src/main/webapp/scripts/views/accounts/AccountCreate.js
deleted file mode 100644
index 75c2967..0000000
--- a/security-admin/src/main/webapp/scripts/views/accounts/AccountCreate.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require){
-    'use strict';
-
-    var App		= require('App');
-	var Backbone		= require('backbone');
-	var Communicator	= require('communicator');
-	var XAUtil			= require('utils/XAUtils');
-	var XALinks 		= require('modules/XALinks');
-	
-	var AccountCreate_tmpl = require('hbs!tmpl/accounts/AccountCreate_tmpl'); 
-	var AccountForm = require('views/accounts/AccountForm');
-
-	var AccountCreate = Backbone.Marionette.Layout.extend(
-	/** @lends AccountCreate */
-	{
-		_viewName : 'AccountCreate',
-		
-    	template: AccountCreate_tmpl,
-    	breadCrumbs :function(){
-    		if(this.model.isNew())
-    			return [XALinks.get('Accounts'), XALinks.get('AccountCreate')];
-    		else
-    			return [XALinks.get('Accounts'), XALinks.get('AccountEdit')];
-    	} ,
-        
-		/** Layout sub regions */
-    	regions: {
-			'rForm' :'div[data-id="r_form"]'
-		},
-
-    	/** ui selector cache */
-    	ui: {
-			'btnSave'	: '[data-id="save"]',
-			'btnCancel' : '[data-id="cancel"]'
-		},
-
-		/** ui events hash */
-		events: function() {
-			var events = {};
-			events['click ' + this.ui.btnSave]		= 'onSave';
-			events['click ' + this.ui.btnCancel]	= 'onCancel';
-			return events;
-		},
-
-    	/**
-		* intialize a new AccountCreate ItemView 
-		* @constructs
-		*/
-		initialize: function(options) {
-			console.log("initialized a AccountCreate ItemView");
-
-			_.extend(this, _.pick(options, ''));
-			
-		
-
-			this.bindEvents();
-		},
-
-		/** all events binding here */
-		bindEvents : function(){
-			/*this.listenTo(this.model, "change:foo", this.modelChanged, this);*/
-			/*this.listenTo(communicator.vent,'someView:someEvent', this.someEventHandler, this)'*/
-		},
-
-		/** on render callback */
-		onRender: function() {
-			this.form = new AccountForm({
-				model : this.model,
-				template : require('hbs!tmpl/accounts/AccountForm_tmpl')
-			});
-			this.rForm.show(this.form);
-			if(!this.model.isNew()){
-				this.form.setUpSwitches();
-			}
-			this.initializePlugins();
-		},
-
-		/** all post render plugin initialization */
-		initializePlugins: function(){
-		},
-
-		onSave: function(){
-			var errors = this.form.commit({validate : false});
-			if(! _.isEmpty(errors)){
-				return;
-			}
-			this.model.save();
-			/*this.model.save({},{
-				wait: true,
-				success: function () {
-					var msg = 'Account created successfully';
-					XAUtil.notifySuccess('Success', msg);
-					App.appRouter.navigate("#!/accounts",{trigger: true});
-					console.log("success");
-				},
-				error: function (model, response, options) {
-					XAUtil.notifyError('Error', 'Error creating Account!');
-					console.log("error");
-				}
-			});*/
-		},
-		onCancel: function(){
-			App.appRouter.navigate("#!/accounts",{trigger: true});
-		},
-		/** on close */
-		onClose: function(){
-			App.appRouter.navigate("#!/accounts",{trigger: true});
-		}
-
-	});
-
-	return AccountCreate;
-});

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/accounts/AccountDetailLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/accounts/AccountDetailLayout.js b/security-admin/src/main/webapp/scripts/views/accounts/AccountDetailLayout.js
deleted file mode 100644
index f23813f..0000000
--- a/security-admin/src/main/webapp/scripts/views/accounts/AccountDetailLayout.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require){
-    'use strict';
-
-	var Backbone		= require('backbone');
-	var Communicator	= require('communicator');
-
-	var AccountdetaillayoutTmpl = require('hbs!tmpl/accounts/AccountDetailLayout_tmpl');
-	
-
-	var AccountDetailLayout = Backbone.Marionette.Layout.extend(
-	/** @lends AccountDetailLayout */
-	{
-		_viewName : 'AccountDetailLayout',
-		
-    	template: AccountdetaillayoutTmpl,
-        
-		/** Layout sub regions */
-    	regions: {
-    		rAccountDetail : '#r_accDetail'
-    	},
-
-    	/** ui selector cache */
-    	ui: {},
-
-		/** ui events hash */
-		events: function() {
-			var events = {};
-			//events['change ' + this.ui.input]  = 'onInputChange';
-			return events;
-		},
-
-    	/**
-		* intialize a new AccountDetailLayout Layout 
-		* @constructs
-		*/
-		initialize: function(options) {
-			console.log("initialized a AccountDetailLayout Layout");
-
-			_.extend(this, _.pick(options, ''));
-			
-			this.bindEvents();
-		},
-
-		/** all events binding here */
-		bindEvents : function(){
-			/*this.listenTo(this.model, "change:foo", this.modelChanged, this);*/
-			/*this.listenTo(communicator.vent,'someView:someEvent', this.someEventHandler, this)'*/
-		},
-
-		/** on render callback */
-		onRender: function() {
-			this.initializePlugins();
-			this.renderDetailView();
-		},
-		renderDetailView : function(){
-			var that = this;	
-			
-        },
-		/** all post render plugin initialization */
-		initializePlugins: function(){
-		},
-
-		/** on close */
-		onClose: function(){
-		}
-
-	});
-
-	return AccountDetailLayout; 
-});

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/accounts/AccountForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/accounts/AccountForm.js b/security-admin/src/main/webapp/scripts/views/accounts/AccountForm.js
deleted file mode 100644
index 718b9d6..0000000
--- a/security-admin/src/main/webapp/scripts/views/accounts/AccountForm.js
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require){
-    'use strict';
-
-	var Backbone		= require('backbone');
-	var Communicator	= require('communicator');
-	var localization = require('utils/XALangSupport');
-	var XAEnums 	= require('utils/XAEnums');
-	
-	require('Backbone.BootstrapModal');
-	require('backbone-forms.list');
-	require('backbone-forms.templates');
-	require('backbone-forms');
-
-	var AccountForm = Backbone.Form.extend(
-	/** @lends AccountForm */
-	{
-		_viewName : 'AccountForm',
-    	/**
-		* intialize a new AccountForm Form View 
-		* @constructs
-		*/
-		initialize: function(options) {
-			console.log("initialized a AccountForm Form View");
-    		Backbone.Form.prototype.initialize.call(this, options);
-
-			_.extend(this, _.pick(options, ''));
-
-			this.bindEvents();
-		},
-		
-		/*schema : function(){
-			return _.pick(_.result(this.model.schema),'customerName', 'accountStatus', 'accountCode');
-		},
-*/
-		/** all events binding here */
-		bindEvents : function(){
-			/*this.on('field:change', function(form, fieldEditor){
-    			this.evFieldChange(form, fieldEditor);
-    		});*/
-		},
-
-		/** on render callback */
-		onRender: function() {
-			this.initializePlugins();
-			/*if(!this.model.isNew()){
-				this.setUpSwitches();
-			}*/
-		},
-		setUpSwitches :function(){
-			var that = this;
-			var accountStatus = false;
-			_.each(_.toArray(XAEnums.BooleanValue),function(m){
-				if(parseInt(that.model.get('accountStatus')) == m.value)
-					accountStatus =  (m.label == XAEnums.BooleanValue.BOOL_TRUE.label) ? true : false;
-			});
-			this.fields.accountStatus.editor.setValue(accountStatus);
-		},
-
-		/** all post render plugin initialization */
-		initializePlugins: function(){
-		}
-
-	});
-
-	return AccountForm;
-});

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/accounts/AccountTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/accounts/AccountTableLayout.js b/security-admin/src/main/webapp/scripts/views/accounts/AccountTableLayout.js
deleted file mode 100644
index 1bb863b..0000000
--- a/security-admin/src/main/webapp/scripts/views/accounts/AccountTableLayout.js
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- 
-define(function(require) {'use strict';
-
-	var Backbone = require('backbone');
-	var Communicator = require('communicator');
-	
-	var XALinks = require('modules/XALinks');
-	var XAEnums 	= require('utils/XAEnums');
-	var localization = require('utils/XALangSupport');
-	var XABackgrid		= require('views/common/XABackgrid');
-	var XATableLayout	= require('views/common/XATableLayout');
-
-	var AccounttablelayoutTmpl = require('hbs!tmpl/accounts/AccountTableLayout_tmpl');
-
-	require('backgrid');
-	require('backgrid-paginator');
-	//require('backbone-pageable');
-	require('jquery-toggles');
-
-	var AccountTableLayout = Backbone.Marionette.Layout.extend(
-	/** @lends AccountTableLayout */
-	{
-		_viewName : 'AccountTableLayout',
-
-		template : AccounttablelayoutTmpl,
-		breadCrumbs : [XALinks.get('Accounts')],
-
-		/** Layout sub regions */
-		regions : {
-			'rTableList' : 'div[data-id="r_tableList"]',
-			'rPagination' : 'div[data-id="r_pagination"]'
-		},
-
-		/** ui selector cache */
-		ui : {},
-
-		/** ui events hash */
-		events : function() {
-			var events = {};
-			//events['change ' + this.ui.input]  = 'onInputChange';
-			return events;
-		},
-
-		/**
-		 * intialize a new AccountTableLayout Layout
-		 * @constructs
-		 */
-		initialize : function(options) {
-			console.log("initialized a AccountTableLayout Layout");
-
-			_.extend(this, _.pick(options, ''));
-
-			this.bindEvents();
-		},
-
-		/** all events binding here */
-		bindEvents : function() {
-			/*this.listenTo(this.model, "change:foo", this.modelChanged, this);*/
-			/*this.listenTo(communicator.vent,'someView:someEvent', this.someEventHandler, this)'*/
-		},
-
-		/** on render callback */
-		onRender : function() {
-			this.initializePlugins();
-			this.renderTable();
-		},
-
-		/** all post render plugin initialization */
-		initializePlugins : function() {
-		},
-
-		renderTable : function() {
-			/*if(! this.collection.length){
-			 return;
-			 }*/
-			/*var TableRow = Backgrid.Row.extend({
-			});
-
-			this.rTableList.show(new Backgrid.Grid({
-				className: 'table table-bordered table-condensed backgrid',
-				columns : this.getColumns(),
-				collection : this.collection,
-				row : TableRow
-			}));
-			
-
-			this.rPagination.show(new Backgrid.Extension.Paginator({
-				collection : this.collection,
-				className: "pagination",
-				controls : {
-					rewind : {
-						label : "«",
-						title : "First"
-					},
-					back : {
-						label : "‹",
-						title : "Previous"
-					},
-					forward : {
-						label : "›",
-						title : "Next"
-					},
-					fastForward : {
-						label : "»",
-						title : "Last"
-					}
-				},
-			}));*/
-			this.rTableList.show(new XATableLayout({
-				columns: this.getColumns(),
-				collection: this.collection,
-				includeFilter : false,
-				gridOpts : {
-					header : XABackgrid,
-					emptyText : 'No Accounts found!'
-				}
-			}));
-		},
-
-		getColumns : function() {
-			var cols = {
-				//id : {},
-				customerName : {
-					label : "Customer Name",
-					cell : "uri",
-					href: function(model){
-						return '#!/account/'+model.get('id')+'/user/' + 1;
-					}
-				},
-				accountStatus : {
-					label : "Status",
-					/*cell :"Switch",
-					formatter : _.extend({}, Backgrid.CellFormatter.prototype, {
-						fromRaw : function(rawValue) {
-							var status;
-							_.each(_.toArray(XAEnums.BooleanValue),function(m){
-								if(parseInt(rawValue) == m.value){
-									status =  (m.label == XAEnums.BooleanValue.BOOL_TRUE.label) ? true : false;
-									return ;
-								}	
-							});
-							//You can use rawValue to custom your html, you can change this value using the name parameter.
-							return status;
-						}
-					}),*/
-					formatter : _.extend({}, Backgrid.CellFormatter.prototype, {
-						fromRaw : function(rawValue) {
-							return rawValue == XAEnums.ActiveStatus.STATUS_ENABLED.value ? XAEnums.ActiveStatus.STATUS_ENABLED.label: XAEnums.ActiveStatus.STATUS_DISABLED.label;
-						}
-					})
-				}
-				/*action : {
-					cell :"uri",
-					label : localization.tt("lbl.action"),
-					href: function(model){
-						return '#!/accounts/' + model.id+'/edit';
-					},
-					title : 'Edit',
-					editable:false,
-					iconKlass :'icon-edit',
-					iconTitle :'Edit'
-					
-
-				}*/
-			};
-			return this.collection.constructor.getTableCols(cols, this.collection);
-		},
-
-		/** on close */
-		onClose : function() {
-		}
-	});
-
-	return AccountTableLayout;
-});

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/common/AddGroup.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/common/AddGroup.js b/security-admin/src/main/webapp/scripts/views/common/AddGroup.js
index ecee740..1246e57 100644
--- a/security-admin/src/main/webapp/scripts/views/common/AddGroup.js
+++ b/security-admin/src/main/webapp/scripts/views/common/AddGroup.js
@@ -27,7 +27,7 @@ define(function(require){
 	var XAEnums			= require('utils/XAEnums');
 	var localization	= require('utils/XALangSupport');
 	var VXGroup			= require('models/VXGroup');
-	var AddGroup_tmpl = require('hbs!tmpl/common/AddGroup_tmpl');
+	var AddGroup_tmpl 	= require('hbs!tmpl/common/AddGroup_tmpl');
 	
 	require('bootstrap-editable');
 	var AddGroup = Backbone.Marionette.ItemView.extend(
@@ -61,7 +61,6 @@ define(function(require){
 		*/
 		initialize: function(options) {
 			console.log("initialized a AddGroup ItemView");
-
 			_.extend(this, _.pick(options));
 			this.bindEvents();
 		},
@@ -94,38 +93,30 @@ define(function(require){
 			    		return;
 			    	}
 			    	that.checkDirtyFieldForGroup(values);
-			    	if(!_.isArray(values))
-			    		values=values.toString().split(',');
+			    	if(!_.isArray(values))	values=values.toString().split(',');
+			    	
 			    	var valArr = [];
-			    	if(!_.isUndefined($(that.el).find('.select2-container-multi')) && $(that.el).find('.select2-container-multi').length > 0){
+			    	if(!_.isUndefined($(that.el).find('.select2-container-multi')) 
+			    			&& $(that.el).find('.select2-container-multi').length > 0){
 			    		values = $(that.el).find('.select2-container-multi').select2('data')
-			    	}else{
+			    	} else {
 			    		var groupNameList = that.model.get('groupNameList');
 			    		values = _.map(that.model.get('groupIdList'),function(id,i){ return {'id': id, 'text': groupNameList[i]};});
 			    	}
+			    	
 			    	valArr = _.map(values,function(val,i){ 
 			    		return "<span class='label label-inverse'>" + val.text + "</span>"  
 			    	},that);
+
 			    	that.groupArr = values;
 			    	that.firstTimeEditGroup = true;
-		    		
 		    		$(this).html(valArr.join(" "));
-		    		/*if(valArr.length > 0){
-		    			that.$('.field-groupIdList').removeClass('error');
-		    			that.ui.errorMsg.hide();
-		    		}else{
-		    			that.$('.field-groupIdList').addClass('error');
-		    			that.ui.errorMsg.show();
-		    		}*/
-			    		
 			    },
 			    success: function(response, newValue) {
-			    	console.log(newValue);
 			    	that.firstTimeEditGroup = false;
-			    	//that.model.set('group',newValue);
-			    	
 			    }
 			});
+
 			this.$('[id^="tags-edit-"]').click(function(e) {
 			    e.stopPropagation();
 			    e.preventDefault();
@@ -140,9 +131,7 @@ define(function(require){
 		    var valuesSoFar = {};
 		    for (var i = 0; i < array.length; ++i) {
 		        var value = array[i];
-		        if (Object.prototype.hasOwnProperty.call(valuesSoFar, value)) {
-		            return true;
-		        }
+		        if (Object.prototype.hasOwnProperty.call(valuesSoFar, value)) { return true; }
 		        valuesSoFar[value] = true;
 		    }
 		    return false;
@@ -162,22 +151,12 @@ define(function(require){
 					var data = [];
 					if(!_.isUndefined(that.groupArr) && that.firstTimeEditGroup){
 						data = that.groupArr;
-					}
-					else
+					} else {
 						data = element.select2('data');
+					}
 					
 					callback(data);
 				},
-				/*createSearchChoice: function(term, data) {
-					if ($(data).filter(function() {
-						return this.text.localeCompare(term) === 0;
-					}).length === 0) {
-						return {
-							id : term,
-							text: term
-						};
-					}
-				},*/
 				ajax: { 
 					url: "service/xusers/groups",
 					dataType: 'json',
@@ -187,20 +166,19 @@ define(function(require){
 					results: function (data, page) { 
 						var results = [],selectedVals = [];
 						groupCnt = data.resultSize
-						if(!_.isEmpty(that.$('.tags').data('editable').input.$input.val()))
+						
+						if(!_.isEmpty(that.$('.tags').data('editable').input.$input.val())) {
 							selectedVals = that.$('.tags').data('editable').input.$input.val().split(',');
+						}
 						if(data.resultSize != "0"){
-							//if(data.vXGroups.length > 1){
-								results = data.vXGroups.map(function(m, i){	return {id : (m.id).toString(), text: m.name};	});
-								if(!_.isEmpty(selectedVals))
-									results = XAUtil.filterResultByIds(results, selectedVals);
-				//				console.log(results.length);
-								groupCnt = results.length;
-								return {results : results};
-					//		}
-						//	results = [{id : (data.vXGroups.id)+"", text: data.vXGroups.name}];
-						//	return {results : results};
+							results = data.vXGroups.map(function(m, i){	return {id : (m.id).toString(), text: m.name};	});
+							if(!_.isEmpty(selectedVals)) {
+								results = XAUtil.filterResultByIds(results, selectedVals);
+							}
+							groupCnt = results.length;
+							return {results : results};
 						}
+						
 						return {results : results};
 					}
 				},	
@@ -211,20 +189,18 @@ define(function(require){
 					return result.text;
 				},
 				formatNoMatches: function(result){
-					if(groupCnt > 0)
-						return 'Please enter one more character.'
-					else
-						return 'No group found.';
+					return groupCnt > 0 ? 'Please enter one more character.' : 'No group found.';  
 				}
 			};
 		},
 		checkDirtyFieldForGroup : function(changeValues){
 			var groupIdList = [];
-			if(!_.isArray(changeValues))
-				changeValues = [changeValues];
-			changeValues = _.map(changeValues, function(val){return parseInt(val);});
-			if(!_.isUndefined(this.model.get('groupIdList')))
+			if(!_.isArray(changeValues)) changeValues = [changeValues];
+
+			changeValues = _.map(changeValues, function(val){ return parseInt(val); });
+			if(!_.isUndefined(this.model.get('groupIdList'))){
 				groupIdList = this.model.get('groupIdList'); 
+			}
 			XAUtil.checkDirtyField(groupIdList, changeValues, this.$el);
 		},
 		

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/common/BreadCrumbs.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/common/BreadCrumbs.js b/security-admin/src/main/webapp/scripts/views/common/BreadCrumbs.js
index c1f2d4b..136d9a0 100644
--- a/security-admin/src/main/webapp/scripts/views/common/BreadCrumbs.js
+++ b/security-admin/src/main/webapp/scripts/views/common/BreadCrumbs.js
@@ -27,7 +27,6 @@
 define(function(require) {
 	var Marionette	= require('backbone.marionette');
 	var tmpl		= require('hbs!tmpl/common/breadcrumbs');
-//	var Vent		= new Backbone.Wreqr.EventAggregator();
 	var App		= require('App');
 
 	var BreadCrumbs = Marionette.ItemView.extend({
@@ -42,14 +41,9 @@ define(function(require) {
 			if(typeof options !== 'undefined'){
 				this.breadcrumb = options.breadcrumb;
 			}
-			//In docs the breadcrubs region stays constant only inner content changes
-	/*		this.listenTo(Vent,'draw:docs:breadcrumbs',function(breads){
-				this.breadcrumb = breads;
-				this.reRenderBookmarks();
-			},this);*/
 		},
 		onRender : function(){
-
+			this.$el.find('li:last a').on('click',function(){ return false; });
 		},
 		reRenderBookmarks : function(){
 			this.breadcrumb = this.setLast(this.breadcrumb);
@@ -57,22 +51,12 @@ define(function(require) {
 		},
 		setLast : function(breadcrumb){
 			if(breadcrumb.length > 0){
-				//breadcrumb[breadcrumb.length -1].isLast = true;
 				breadcrumb[breadcrumb.length -1] = _.extend({},breadcrumb[breadcrumb.length -1],{isLast : true});
 			}
 			return breadcrumb;
 		},
-		// showBreadCrumbs : function(view,breadcrumb){
-			// var brRgn = view.$el.find('#brdCrumbs');
-			// if(brRgn){
-				// $(brRgn).html(Marionette.Renderer.render(tmpl,{breadcrumb : this.setLast(breadcrumb)}));	
-			// }/*else{*/
-			   // ////throw new Error('This view does not have a  #brdCrumbs id'); 
-			// /*}*/
-		// },
 		onClose : function(){       
 			console.log('OnItemClosed called of BreadCrumbs');
-		//	this.stopListening(Vent);
 		}
 	});
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/common/FormInputItemList.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/common/FormInputItemList.js b/security-admin/src/main/webapp/scripts/views/common/FormInputItemList.js
deleted file mode 100644
index ca1ebc4..0000000
--- a/security-admin/src/main/webapp/scripts/views/common/FormInputItemList.js
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- /*
- *
- */
-define(function(require) {
-    'use strict';
-    
-	var Backbone		= require('backbone');
-    var App		        = require('App');
-	var XAEnums			= require('utils/XAEnums');
-	var XAUtil			= require('utils/XAUtils');
-	var localization	= require('utils/XALangSupport');
-	var VXGroup			= require('models/VXGroup');
-	require('bootstrap-editable');
-    	
-	var FormInputItem = Backbone.Marionette.ItemView.extend({
-		_msvName : 'FormInputItem',
-		template : require('hbs!tmpl/common/formInputItem'),
-		tagName : 'tr',
-		templateHelpers : function(){
-			
-			return {
-				permissions 	: _.flatten(_.pick(XAEnums.XAPermType,  XAUtil.getPerms(this.policyType))),
-				policyKnox 		: this.policyType == XAEnums.AssetType.ASSET_KNOX.value ? true :false,
-				policyStorm 	: this.policyType == XAEnums.AssetType.ASSET_STORM.value ? true :false,
-				isModelNew		: !this.model.has('editMode'),
-				stormPerms		: this.stormPermsIds.length == 14 ? _.union(this.stormPermsIds,[-1]) : this.stormPermsIds  
-						
-			};
-		},
-		ui : {
-			selectGroups	: '[data-js="selectGroups"]',
-			inputIPAddress	: '[data-js="ipAddress"]',
-			tags			: '[class=tags]'
-		},
-		events : {
-			'click [data-action="delete"]'	: 'evDelete',
-			'click td'						: 'evClickTD',
-			'change [data-js="selectGroups"]': 'evSelectGroup',
-			'change [data-js="ipAddress"]'	: 'evIPAddress'
-		},
-
-		initialize : function(options) {
-			_.extend(this, _.pick(options, 'groupList','policyType'));
-            //this.subjectList = this.mStudent.getSubjectList();
-			this.stormPermsIds = [];
-			if(this.policyType == XAEnums.AssetType.ASSET_STORM.value){
-				if(this.model.has('editMode') && this.model.get('editMode')){
-					this.stormPermsIds = _.map(this.model.get('_vPermList'), function(p){
-											if(XAEnums.XAPermType.XA_PERM_TYPE_ADMIN.value != p.permType)
-												return p.permType;
-										});
-				}
-			}
-		},
- 
-		onRender : function() {
-			var that = this;
-			if(!_.isUndefined(this.model.get('groupId'))){
-				this.ui.selectGroups.val(this.model.get('groupId').split(','));
-			}
-			if(!_.isUndefined(this.model.get('ipAddress'))){
-				this.ui.inputIPAddress.val(this.model.get('ipAddress').toString());
-			}
-			if(this.model.has('editMode') && this.model.get('editMode')){
-				_.each(this.model.get('_vPermList'), function(p){
-					this.$el.find('input[data-id="' + p.permType + '"]').attr('checked', 'checked');
-				},this);
-			}
-			this.createGroupDropDown();
-			this.groupDropDownChange();
-			if(this.policyType == XAEnums.AssetType.ASSET_STORM.value){
-				this.renderStormPerms();
-			}
-		},
-		groupDropDownChange : function(){
-			var that = this;
-			this.ui.selectGroups.on('change',function(e){
-		//		console.log(e.currentTarget.value);
-				that.checkDirtyFieldForDropDown(e);
-				var duplicateGroupName = false;
-				
-				that.toggleAddButton(e);
-				if(e.removed != undefined){
-					var gIdArr = [],gNameArr = [];
-					gIdArr = _.without(that.model.get('groupId').split(','), e.removed.id);
-					if(that.model.get('groupName') != undefined)
-						gNameArr = _.without(that.model.get('groupName').split(','), e.removed.text);
-					if(!_.isEmpty(gIdArr)){
-						that.model.set('groupId',gIdArr.join(','));
-						that.model.set('groupName',gNameArr.join(','));
-					}else{
-						that.model.unset('groupId');
-						that.model.unset('groupName');
-					}
-					return;
-				}
-				if(!_.isUndefined(e.added)){
-						that.model.set('groupId', e.currentTarget.value);
-				}
-			});
-		},
-		createGroupDropDown :function(){
-			var that = this;
-			if(this.model.has('editMode') && !_.isEmpty(this.ui.selectGroups.val())){
-				var temp = this.ui.selectGroups.val().split(",");
-				_.each(temp , function(id){
-					if(_.isUndefined(that.groupList.get(id))){
-						var group = new VXGroup({id : id});
-						group.fetch({async:false}).done(function(){
-							that.groupList.add(group);
-						});
-					}
-				});
-			}
-			this.groupArr = this.groupList.map(function(m){
-				return { id : m.id+"" , text : m.get('name')};
-			});
-			this.ui.selectGroups.select2({
-				closeOnSelect : true,
-				placeholder : 'Select Group',
-			//	maximumSelectionSize : 1,
-				width :'220px',
-				tokenSeparators: [",", " "],
-				tags : this.groupArr, 
-				initSelection : function (element, callback) {
-					var data = [];
-					console.log(that.groupList);
-					
-					$(element.val().split(",")).each(function () {
-						var obj = _.findWhere(that.groupArr,{id:this});
-					//	if(!_.isUndefined(obj))
-							data.push({id: this, text: obj.text});
-						/*else{
-							var group = new VXGroup({id : this});
-							group.fetch().done(function(){
-									data.push({id: group.id, text: group.get('name')});
-							});
-						}*/
-					});
-					callback(data);
-				},
-				createSearchChoice: function(term, data) {
-				/*	if ($(data).filter(function() {
-						return this.text.localeCompare(term) === 0;
-					}).length === 0) {
-						return {
-							id : term,
-							text: term
-						};
-					}*/
-				},
-				ajax: { 
-					url: "service/xusers/groups",
-					dataType: 'json',
-					data: function (term, page) {
-                        return {name : term, isVisible : XAEnums.VisibilityStatus.STATUS_VISIBLE.value};
-					},
-					results: function (data, page) { 
-						var results = [] , selectedVals = [];
-						/*if(!_.isEmpty(that.ui.selectGroups.select2('val')))
-							selectedVals = that.ui.selectGroups.select2('val');*/
-						selectedVals = that.getGroupSelectdValues();
-						if(data.resultSize != "0"){
-							//if(data.vXGroups.length > 1){
-
-								results = data.vXGroups.map(function(m, i){	return {id : m.id+"", text: m.name};	});
-								if(!_.isEmpty(selectedVals))
-									results = XAUtil.filterResultByIds(results, selectedVals);
-						//		console.log(results.length);
-								return {results : results};
-							//}
-						//	results = [{id : data.vXGroups.id+"", text: data.vXGroups.name}];
-						//	return {results : results};
-						}
-						return {results : results};
-					}
-				},	
-				formatResult : function(result){
-					return result.text;
-				},
-				formatSelection : function(result){
-					return result.text;
-				},
-				formatNoMatches: function(result){
-					return 'No group found.';
-				}
-			}).on('select2-focus', XAUtil.select2Focus);
-		},
-		getGroupSelectdValues : function(){
-			var vals = [],selectedVals = [];
-			this.collection.each(function(m){
-				if(!_.isUndefined(m.get('groupId'))){
-					vals.push.apply(vals, m.get('groupId').split(','));
-				}
-			});
-			if(!_.isEmpty(this.ui.selectGroups.select2('val')))
-				selectedVals = this.ui.selectGroups.select2('val');
-			vals.push.apply(vals , selectedVals);
-			vals = $.unique(vals);
-			return vals;
-		},
-		evDelete : function(){
-			var that = this;
-			this.collection.remove(this.model);
-			this.toggleAddButton();
-		},
-		evClickTD : function(e){
-			var $el = $(e.currentTarget),permList =[],perms =[];
-			if($(e.toElement).is('td')){
-				var $checkbox = $el.find('input');
-				$checkbox.is(':checked') ? $checkbox.prop('checked',false) : $checkbox.prop('checked',true);
-			}
-			var curPerm = $el.find('input').data('id');
-			if(!_.isUndefined(curPerm)){
-				var perms = [];
-				if(this.model.has('_vPermList')){
-					if(_.isArray(this.model.get('_vPermList')))
-						perms = this.model.get('_vPermList');
-					else
-						perms.push(this.model.get('_vPermList'));
-				}
-				/* permMapList = [ {id: 18, groupId : 1, permType :5}, {id: 18, groupId : 1, permType :4}, {id: 18, groupId : 2, permType :5} ]
-			   [1] => [ {id: 18, groupId : 1, permType :5}, {id: 19, groupId : 1, permType :4} ]
-			   [2] => [ {id: 20, groupId : 2, permType :5} ]
-			{ 	groupId : 1,
-				_vPermList : [ { id: 18, permType : 5 }, { id: 19, permType : 4 } ]
-			}
-			this.model => { 	groupId : 2,
-				_vPermList : [ { id: 20, permType : 5 }, { permType : 6 } ]
-			}
-			
-				 */
-//			perms = this.model.has('_vPermList') ? this.model.get('_vPermList'): [];
-				
-				if($el.find('input[type="checkbox"]').is(':checked')){
-					perms.push({permType : curPerm});
-					if(curPerm == XAEnums.XAPermType.XA_PERM_TYPE_ADMIN.value){
-						$el.parent().find('input[type="checkbox"]:not(:checked)[data-id!="'+curPerm+'"]').map(function(){
-							perms.push({ permType :$(this).data('id')});
-							//  return { permType :$(this).data('id')};
-						});
-						$el.parent().find('input[type="checkbox"]').prop('checked',true);
-					}
-				} else {
-					perms = _.reject(perms,function(el) { return el.permType == curPerm; });
-				}
-				
-				this.checkDirtyFieldForCheckBox(perms);
-				if(!_.isEmpty(perms))
-					this.model.set('_vPermList', perms);
-				else 
-					this.model.unset('_vPermList');
-			}
-		},
-		checkDirtyFieldForCheckBox : function(perms){
-			var permList = [];
-			if(!_.isUndefined(this.model.get('_vPermList')))
-				permList = _.map(this.model.attributes._vPermList,function(obj){return obj.permType;});
-			perms = _.map(perms,function(obj){return obj.permType;});
-			XAUtil.checkDirtyField(permList, perms, this.$el);
-		},
-		toggleAddButton : function(e){
-			var temp = [];
-			this.collection.each(function(m){
-				if(!_.isUndefined(m.get('groupId'))){
-					temp.push.apply(temp, m.get('groupId').split(','));
-					
-				}
-			});
-			if(!_.isUndefined(e)){
-				if( !_.isUndefined(e.added) && ((temp.length + 1) == this.groupList.length)) 
-					$('[data-action="addGroup"]').hide();
-				if(!_.isUndefined(e.removed))
-					$('[data-action="addGroup"]').show();
-			}else{
-				$('[data-action="addGroup"]').show();
-			}
-		},
-		evIPAddress :function(e){
-			if(!_.isEmpty($(e.currentTarget).val()))
-				this.model.set('ipAddress',$(e.currentTarget).val().split(','));
-			else
-				this.model.unset('ipAddress');
-		},
-		renderStormPerms :function(){
-			var that = this;
-			var permArr = _.pick(XAEnums.XAPermType,  XAUtil.getStormActions(this.policyType));
-			this.stormPerms =  _.map(permArr,function(m){return {text:m.label, value:m.value};});
-			this.stormPerms.push({'value' : -1, 'text' : 'Select/Deselect All'});
-			this.ui.tags.editable({
-			    placement: 'right',
-//			    emptytext : 'Please select',
-			    source: this.stormPerms,
-			    display: function(idList,srcData) {
-			    	if(_.isEmpty(idList.toString())){
-			    		$(this).html('');
-			    		return;
-			    	}
-			    	if(!_.isArray(idList))
-			    		idList = [idList];
-//			    	that.checkDirtyFieldForGroup(values);
-			    	var permTypeArr = [];
-		    		var valArr = _.map(idList, function(id){
-		    			if(!(parseInt(id) <= 0) && (!_.isNaN(parseInt(id)))){
-		    				var obj = _.findWhere(srcData,{'value' : parseInt(id)});
-		    				permTypeArr.push({permType : obj.value});
-		    				return "<span class='label label-inverse'>" + obj.text + "</span>";
-		    			}
-		    		});
-		    		
-		    		if(that.model.has('_vPermList')){
-                        var adminPerm = _.where(that.model.get('_vPermList'),{'permType': XAEnums.XAPermType.XA_PERM_TYPE_ADMIN.value });
-                        permTypeArr = _.isEmpty(adminPerm) ? permTypeArr : _.union(permTypeArr,adminPerm);
-                    }
-                    that.model.set('_vPermList', permTypeArr);
-//		    		if(!_.isEmpty(perms))
-//		    			that.model.set('_vPermList', perms);
-//		    		that.model.set('_vPermList', permTypeArr);
-		    		$(this).html(valArr.join(" "));
-			    },
-			});
-			this.$('[id^="tags-edit-"]').click(function(e) {
-			    e.stopPropagation();
-			    e.preventDefault();
-			    that.$('#' + $(this).data('editable') ).editable('toggle');
-			    that.$('input[type="checkbox"][value="-1"]').click(function(e){
-					var checkboxlist =$(this).closest('.editable-checklist').find('input[type="checkbox"][value!=-1]')
-					$(this).is(':checked') ? checkboxlist.prop('checked',true) : checkboxlist.prop('checked',false); 
-					
-				});
-			});
-			
-		},
-		checkDirtyFieldForDropDown : function(e){
-			//that.model.has('groupId')
-			var groupIdList =[];
-			if(!_.isUndefined(this.model.get('groupId')))
-				groupIdList = this.model.get('groupId').split(',');
-			XAUtil.checkDirtyField(groupIdList, e.val, $(e.currentTarget));
-		},
-
-	});
-
-
-
-	return Backbone.Marionette.CompositeView.extend({
-		_msvName : 'FormInputItemList',
-		template : require('hbs!tmpl/common/formInputItemList'),
-		//tagName : 'ul', 
-		//className : 'timeline-container',
-		templateHelpers :function(){
-			console.log(XAUtil.getPermHeaders(this.policyType));
-			return {
-				permHeaders : XAUtil.getPermHeaders(this.policyType)
-			};
-		},
-		getItemView : function(item){
-			if(!item){
-				return;
-			}
-			return FormInputItem;
-		},
-		itemViewContainer : ".js-formInput",
-		itemViewOptions : function() {
-			return {
-				'collection' 	: this.collection,
-				'groupList' 	: this.groupList,
-				'policyType'	: this.policyType,
-			};
-		},
-		events : {
-			'click [data-action="addGroup"]' : 'addNew'
-		},
-		initialize : function(options) {
-			_.extend(this, _.pick(options, 'groupList','policyType'));
-			//this.hiveGroupPerm = _.has(options,'hiveGroupPerm') ? true : false;
-			this.listenTo(this.groupList, 'sync', this.render, this);
-			if(this.collection.length == 0)
-				this.collection.add(new Backbone.Model());
-		},
-		onRender : function(){
-			//console.log("onRender of ArtifactFormNoteList called");
-			this.toggleAddButton();
-		},
-		addNew : function(){
-			var that =this;
-			if(this.groupList.length > this.collection.length){
-				this.collection.add(new Backbone.Model());
-				this.toggleAddButton();
-			}
-		},
-		toggleAddButton : function(){
-			var groupIds=[];
-			this.collection.each(function(m){
-				if(!_.isUndefined(m.get('groupId'))){
-					var temp = m.get('groupId').split(',');
-					groupIds.push.apply(groupIds,temp);
-				}
-			});
-			if(groupIds.length == this.groupList.length)
-				this.$('button[data-action="addGroup"]').hide();
-			else
-				this.$('button[data-action="addGroup"]').show();
-		},
-	});
-
-});

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/common/TopNav.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/common/TopNav.js b/security-admin/src/main/webapp/scripts/views/common/TopNav.js
index 0e7c6e9..bc5d17c 100644
--- a/security-admin/src/main/webapp/scripts/views/common/TopNav.js
+++ b/security-admin/src/main/webapp/scripts/views/common/TopNav.js
@@ -53,6 +53,7 @@ define(function(require){
 		initialize: function(options) {
 			console.log("initialized a TopNav ItemView");
 			_.extend(this, _.pick(options, ''));
+			
 			this.bindEvents();
 			this.appState = options.appState;
         	this.appState.on('change:currentTab', this.highlightNav,this);
@@ -110,7 +111,6 @@ define(function(require){
         	this.$('#nav' + this.appState.get('currentTab')).parent().addClass('active');
         },
         mainManuURLS : function() {
-			
 		},
 		/** on close */
 		onClose: function(){

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/common/UserPermissionList.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/common/UserPermissionList.js b/security-admin/src/main/webapp/scripts/views/common/UserPermissionList.js
index fce1963..58da18c 100644
--- a/security-admin/src/main/webapp/scripts/views/common/UserPermissionList.js
+++ b/security-admin/src/main/webapp/scripts/views/common/UserPermissionList.js
@@ -23,12 +23,13 @@
 define(function(require) {
     'use strict';
     
-	var Backbone	= require('backbone');
-    	var App         = require('App');
-	var XAEnums		= require('utils/XAEnums');
+	var Backbone		= require('backbone');
+    var App         	= require('App');
+	var XAEnums			= require('utils/XAEnums');
 	var XAUtil			= require('utils/XAUtils');
 	var localization	= require('utils/XALangSupport');
-	var VXUser		= require('models/VXUser');
+	var VXUser			= require('models/VXUser');
+	
 	require('bootstrap-editable');
     	
 	var UserPermissionItem = Backbone.Marionette.ItemView.extend({
@@ -59,9 +60,10 @@ define(function(require) {
 
 		initialize : function(options) {
 			_.extend(this, _.pick(options, 'userList','policyType'));
-            //this.subjectList = this.mStudent.getSubjectList();
+
 			this.stormPermsIds = [];
 			if(this.policyType == XAEnums.AssetType.ASSET_STORM.value){
+
 				if(this.model.has('editMode') && this.model.get('editMode')){
 					this.stormPermsIds = _.map(this.model.get('_vPermList'), function(p){
 						if(XAEnums.XAPermType.XA_PERM_TYPE_ADMIN.value != p.permType)
@@ -86,17 +88,19 @@ define(function(require) {
 					this.$el.find('input[data-id="' + p.permType + '"]').attr('checked', 'checked');
 				},this);
 			}
-			if(this.policyType == XAEnums.AssetType.ASSET_STORM.value)
+			if(this.policyType == XAEnums.AssetType.ASSET_STORM.value){
 				this.renderStormPerms();
+			}
 			
 			this.createSelectUserDropDown();
 			this.userDropDownChange();
 		},
 		checkDirtyFieldForDropDown : function(e){
-			//that.model.has('groupId')
 			var userIdList =[];
-			if(!_.isUndefined(this.model.get('userId')))
+			
+			if(!_.isUndefined(this.model.get('userId'))){
 				userIdList = this.model.get('userId').split(',');
+			}
 			XAUtil.checkDirtyField(userIdList, e.val, $(e.currentTarget));
 		},
 		toggleAddButton : function(e){
@@ -112,7 +116,7 @@ define(function(require) {
 					$('[data-action="addUser"]').hide();
 				if(!_.isUndefined(e.removed))
 					$('[data-action="addUser"]').show();
-			}else{
+			} else {
 				$('[data-action="addUser"]').show();
 			}
 		},
@@ -123,6 +127,7 @@ define(function(require) {
 		},
 		evClickTD : function(e){
 			var $el = $(e.currentTarget),permList =[],perms =[];
+			
 			if($(e.toElement).is('td')){
 				var $checkbox = $el.find('input');
 				$checkbox.is(':checked') ? $checkbox.prop('checked',false) : $checkbox.prop('checked',true);  
@@ -131,43 +136,26 @@ define(function(require) {
 			if(!_.isUndefined(curPerm)){
 				var perms = [];
 				if(this.model.has('_vPermList')){
-					if(_.isArray(this.model.get('_vPermList')))
+					if(_.isArray(this.model.get('_vPermList'))){
 						perms = this.model.get('_vPermList');
-					else
+					} else {
 						perms.push(this.model.get('_vPermList'));
+					}
 				}
 				
-				
-				/* permMapList = [ {id: 18, groupId : 1, permType :5}, {id: 18, groupId : 1, permType :4}, {id: 18, groupId : 2, permType :5} ]
-			   [1] => [ {id: 18, groupId : 1, permType :5}, {id: 19, groupId : 1, permType :4} ]
-			   [2] => [ {id: 20, groupId : 2, permType :5} ]
-			{ 	groupId : 1,
-				_vPermList : [ { id: 18, permType : 5 }, { id: 19, permType : 4 } ]
-			}
-			this.model => { 	groupId : 2,
-				_vPermList : [ { id: 20, permType : 5 }, { permType : 6 } ]
-			}
-			
-				 */
-				
-//			perms = this.model.has('_vPermList') ? this.model.get('_vPermList'): [];
-				
 				if($el.find('input[type="checkbox"]').is(':checked')){
 					perms.push({permType : curPerm});
+					
 					if(curPerm == XAEnums.XAPermType.XA_PERM_TYPE_ADMIN.value){
 						$el.parent().find('input[type="checkbox"]:not(:checked)[data-id!="'+curPerm+'"]').map(function(){
 							perms.push({ permType :$(this).data('id')});
-							//   return { permType :$(this).data('id')};
 						});
-						//	this.model.set('_vPermList', perms);
 						$el.parent().find('input[type="checkbox"]').prop('checked',true);
 					}
 				} else {
 					perms = _.reject(perms,function(el) { return el.permType == curPerm; });
-					
-					//perms = _.without(perms, curPerm);
-					
 				}
+
 				this.checkDirtyFieldForCheckBox(perms);
 				if(!_.isEmpty(perms)){
 					this.model.set('_vPermList', perms);
@@ -215,15 +203,6 @@ define(function(require) {
 					callback(data);
 				},
 				createSearchChoice: function(term, data) {
-					/*if ($(data).filter(function() {
-						return this.text.localeCompare(term) === 0;
-						//return this.value == (term) ?  true : false;
-					}).length === 0) {
-						return {
-							id : term,
-							text: term
-						};
-					}*/
 				},
 				ajax: { 
 					url: "service/xusers/users",
@@ -233,22 +212,14 @@ define(function(require) {
 					},
 					results: function (data, page) { 
 						var results = [],selectedVals=[];
-						/*if(!_.isEmpty(that.ui.selectUsers.select2('val')))
-							selectedVals = that.ui.selectUsers.select2('val');
-						selectedVals.push.apply(selectedVals, that.getUsersSelectdValues());
-						selectedVals = $.unique(selectedVals);*/
+						
 						selectedVals = that.getUsersSelectdValues();
 						if(data.resultSize != "0"){
-							//if(data.vXUsers.length > 1){
-
 								results = data.vXUsers.map(function(m, i){	return {id : m.id+"", text: m.name};	});
-								if(!_.isEmpty(selectedVals))
+								if(!_.isEmpty(selectedVals)){
 									results = XAUtil.filterResultByIds(results, selectedVals);
-								//console.log(results.length);
+								}
 								return {results : results};
-						//	}
-						//	results = [{id : data.vXUsers.id+"", text: data.vXUsers.name}];
-						//	return {results : results};
 						}
 						return {results : results};
 					}
@@ -268,19 +239,20 @@ define(function(require) {
 		userDropDownChange : function(){
 			var that = this;
 			this.ui.selectUsers.on('change',function(e){
-				//	console.log(e.currentTarget.value);
 					that.checkDirtyFieldForDropDown(e);
 					that.toggleAddButton(e);
 					var duplicateUsername = false;
 					if(e.removed != undefined){
 						var gIdArr = [],gNameArr = [];
+						
 						gIdArr = _.without(that.model.get('userId').split(','), e.removed.id);
-						if(that.model.get('userName') != undefined)
+						if(that.model.get('userName') != undefined){
 							gNameArr = _.without(that.model.get('userName').split(','), e.removed.text);
+						}
 						if(!_.isEmpty(gIdArr)){
 							that.model.set('userId',gIdArr.join(','));
 							that.model.set('userName',gNameArr.join(','));
-						}else{
+						} else {
 							that.model.unset('userId');
 							that.model.unset('userName');
 						}
@@ -288,34 +260,38 @@ define(function(require) {
 						
 					}
 					if(!_.isUndefined(e.added)){
-							that.model.set('userId', e.currentTarget.value);
+						that.model.set('userId', e.currentTarget.value);
 					}
 				});
 		},
 		getUsersSelectdValues : function(){
 			var vals = [],selectedVals = [];
+
 			this.collection.each(function(m){
 				if(!_.isUndefined(m.get('userId'))){
 					vals.push.apply(vals, m.get('userId').split(','));
 				}
 			});
-			if(!_.isEmpty(this.ui.selectUsers.select2('val')))
+			if(!_.isEmpty(this.ui.selectUsers.select2('val'))){
 				selectedVals = this.ui.selectUsers.select2('val');
+			}
 			vals.push.apply(vals , selectedVals);
 			vals = $.unique(vals);
 			return vals;
 		},
 		evIPAddress :function(e){
-			if(!_.isEmpty($(e.currentTarget).val()))
+			if(!_.isEmpty($(e.currentTarget).val())){
 				this.model.set('ipAddress',$(e.currentTarget).val().split(','));
-			else
+			} else {
 				this.model.unset('ipAddress');
+			}
 		},
 		renderStormPerms :function(){
 			var that = this;
 			var permArr = _.pick(XAEnums.XAPermType,  XAUtil.getStormActions(this.policyType));
 			this.stormPerms =  _.map(permArr,function(m){return {text:m.label, value:m.value};});
 			this.stormPerms.push({'value' : -1, 'text' : 'Select/Deselect All'});
+			
 			this.ui.tags.editable({
 			    placement: 'right',
 //			    emptytext : 'Please select',
@@ -325,9 +301,8 @@ define(function(require) {
 			    		$(this).html('');
 			    		return;
 			    	}
-			    	if(!_.isArray(idList))
-			    		idList = [idList];
-//			    	that.checkDirtyFieldForGroup(values);
+			    	if(!_.isArray(idList))	idList = [idList];
+
 			    	var permTypeArr = [];
 		    		var valArr = _.map(idList, function(id){
 		    			if(!(parseInt(id) <= 0) && (!_.isNaN(parseInt(id)))){
@@ -340,8 +315,8 @@ define(function(require) {
                         var adminPerm = _.where(that.model.get('_vPermList'),{'permType': XAEnums.XAPermType.XA_PERM_TYPE_ADMIN.value });
                         permTypeArr = _.isEmpty(adminPerm) ? permTypeArr : _.union(permTypeArr,adminPerm);
                     }
-                    that.model.set('_vPermList', permTypeArr);
-		    		
+
+		    		that.model.set('_vPermList', permTypeArr);
 		    		$(this).html(valArr.join(" "));
 			    },
 			});
@@ -356,7 +331,6 @@ define(function(require) {
 				});
 			});
 		},
-
 	});
 
 
@@ -364,17 +338,14 @@ define(function(require) {
 	return Backbone.Marionette.CompositeView.extend({
 		_msvName : 'UserPermissionList',
 		template : require('hbs!tmpl/common/UserPermissionList'),
-		//tagName : 'ul', 
-		//className : 'timeline-container',
 		templateHelpers :function(){
+
 			return {
 				permHeaders : XAUtil.getPermHeaders(this.policyType,false)
 			};
 		},
 		getItemView : function(item){
-			if(!item){
-				return;
-			}
+			if(!item){	return;	}
 			return UserPermissionItem;
 		},
 		itemViewContainer : ".js-formInput",
@@ -390,12 +361,10 @@ define(function(require) {
 		},
 		initialize : function(options) {
 			_.extend(this, _.pick(options, 'userList','policyType'));
-			//this.listenTo(this.collection, 'removeAddBtn', this.render, this);
-			/*if(options.model.isNew())
-				this.collection.add(new Backbone.Model());*/
-			if(this.collection.length == 0)
+
+			if(this.collection.length == 0){
 				this.collection.add(new Backbone.Model());
-				
+			}
 		},
 		onRender : function(){
 			//console.log("onRender of ArtifactFormNoteList called");
@@ -414,12 +383,11 @@ define(function(require) {
 					userIds.push.apply(userIds,temp);
 				}
 			});
-			if(userIds.length == this.userList.length)
+			if(userIds.length == this.userList.length){
 				this.$('button[data-action="addUser"]').hide();
-			else
+			} else {
 				this.$('button[data-action="addUser"]').show();
+			}
 		}
-	
 	});
-
 });

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/018644b9/security-admin/src/main/webapp/scripts/views/common/XABackgrid.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/common/XABackgrid.js b/security-admin/src/main/webapp/scripts/views/common/XABackgrid.js
index d9cc832..6c95390 100644
--- a/security-admin/src/main/webapp/scripts/views/common/XABackgrid.js
+++ b/security-admin/src/main/webapp/scripts/views/common/XABackgrid.js
@@ -78,10 +78,7 @@ define(function(require){
 			var $clearButton = this.clearButton();
 			var searchTerms = this.searchBox().val();
 
-	      //  if(e.which === XAGlobals.keys.ENTER_KEY ){
-			if(!e.shiftKey)
-				this.search();
-		//	}
+			if(!e.shiftKey)	this.search();
 			
 			if (searchTerms) {
 				$clearButton.show();
@@ -179,10 +176,7 @@ define(function(require){
 			var $clearButton = this.clearButton();
 			var searchTerms = this.searchBox().val();
 
-	      //  if(e.which === XAGlobals.keys.ENTER_KEY ){
-			if(!e.shiftKey)
-				this.search();
-		//	}
+			if(!e.shiftKey)	this.search();
 			
 			if (searchTerms) {
 				$clearButton.show();
@@ -281,7 +275,6 @@ define(function(require){
 			this.$el.find('select').on('click',function(e){
 				that.search(e.currentTarget.value);
 			});
-			//this.delegateEvents();
 			return this;
 
 		},
@@ -307,15 +300,7 @@ define(function(require){
 			collection.fetch({data: data, reset: true});
 		}
 
-		/*clear: function (e) {
-			if (e) e.preventDefault();
-			this.searchBox().val(null);
-			this.collection.fetch({reset: true});
-		}*/
-
 	});
-
-	
 	
 	var HeaderRow = Backgrid.Row.extend({
 
@@ -391,6 +376,5 @@ define(function(require){
 
 	});
 
-
 	return XAHeader;
 });



Mime
View raw message