ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omal...@apache.org
Subject [13/44] ARGUS-1. Initial code commit (Selvamohan Neethiraj via omalley)
Date Thu, 14 Aug 2014 20:50:24 GMT
http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/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
new file mode 100644
index 0000000..449f111
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/controllers/Controller.js
@@ -0,0 +1,602 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require) {
+    'use strict';
+	var Backbone	= require('backbone');
+	var App			= require('App');
+	
+	var MAppState	= require('models/VAppState');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	return Backbone.Marionette.Controller.extend({
+
+		initialize: function( options ) {
+			console.log("initialize a Controller Controller");
+			var vTopNav 	= require('views/common/TopNav');
+			var vProfileBar = require('views/common/ProfileBar');
+			var vFooter 	= require('views/common/Footer');
+
+			App.rTopNav.show(new vTopNav({
+				model : App.userProfile,
+				appState : MAppState
+			}));
+
+			App.rTopProfileBar.show(new vProfileBar({}));
+
+			App.rFooter.show(new vFooter({}));
+		},
+
+		dashboardAction: function (action) {
+            console.log('dashboard action called..');
+			var vDashboardLayout	= require('views/common/DashboardLayout');
+            MAppState.set({
+				'currentTab' : XAGlobals.AppTabs.Dashboard.value
+			});
+			
+            App.rContent.show(new vDashboardLayout({}));
+        },
+		
+	   //************** Policy Related *********************/
+	   policyManagerAction :function(){
+		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   console.log('Policy Manager action called..');
+		   var view 		= require('views/policymanager/PolicyManagerLayout');
+		   var VXAssetList 	= require('collections/VXAssetList');
+		   var collection 	= new VXAssetList();
+		   
+		   collection.fetch({
+			   cache : false,
+			   async:false
+		   }).done(function(){
+			   if(App.rContent.currentView) App.rContent.currentView.close();
+			   App.rContent.show(new view({
+				   collection : collection
+			   }));
+		   });
+	   },
+	   
+	   hdfsManageAction :function(assetId){
+		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/hdfs/HDFSTableLayout');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   var resourceListForAsset = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   collection : resourceListForAsset,
+				   assetModel : assetModel
+			   }));
+			   resourceListForAsset.fetch({
+				   cache : true
+			   });
+		   });   
+	   },
+
+	   policyCreateAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+
+		   var view 			= require('views/policy/PolicyCreate');
+		   var VXResource 		= require('models/VXResource');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 	  		= require('models/VXAsset');
+		   
+		   var assetModel 	= new VXAsset({id:assetId});
+		   var resource		= new VXResource();
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   model : resource,
+				   assetModel : assetModel
+			   }));
+		   });
+	   },
+	   
+	   policyEditAction :function(){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view = require('views/policy/PolicyCreate');
+		   App.rContent.show(new view({
+		   }));
+	   },
+
+	   policyViewAction :function(assetId,id){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+
+		   var VXResource 	  = require('models/VXResource');
+		   var VXResourceList = require('collections/VXResourceList');
+		   var VXAsset 	  	  = require('models/VXAsset');
+		   var view = require('views/policy/PolicyCreate');
+		   
+		   var resource = new VXResource({id : id });
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   
+		   var assetModel = new VXAsset({id:assetId});
+		   resource.fetch({cache:true}).done(function(){
+			   assetModel.fetch({cache : true}).done(function(){
+				   App.rContent.show(new view({
+					   model : resource,
+					   assetModel : assetModel
+				   }));
+			   });
+		   });
+	   },
+	   //************** Policy Related ( HIVE )*********************/
+	   hiveManageAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/hive/HiveTableLayout');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   var resourceListForAsset = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   collection : resourceListForAsset,
+				   assetModel : assetModel
+			   }));
+			   resourceListForAsset.fetch({
+				   cache : true
+			   });
+		   });   
+	   },
+	   hivePolicyCreateAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/hive/HivePolicyCreate');
+		   var VXResource 		= require('models/VXResource');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   
+		   var assetModel = new VXAsset({id:assetId});
+		   var resource	  = new VXResource();
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   model : resource,
+			   		assetModel : assetModel
+			   }));
+		   });	   
+	   },
+	   hivePolicyEditAction :function(assetId,id){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+    	   var VXResource 		= require('models/VXResource');
+    	   var VXResourceList 	= require('collections/VXResourceList');
+    	   var VXAsset 		  	= require('models/VXAsset');
+		   var view 			= require('views/hive/HivePolicyCreate');
+		   var resource 		= new VXResource({id : id });
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   resource.fetch({cache:true}).done(function(){
+			   assetModel.fetch({cache : true}).done(function(){
+				   App.rContent.show(new view({
+					   model : resource,
+					   assetModel : assetModel
+				   }));
+			   });
+		   });
+	   },
+	   
+	   //************** Policy Related ( KNOX )*********************/
+	   knoxManageAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/knox/KnoxTableLayout');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   
+		   var resourceListForAsset = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   collection  :resourceListForAsset,
+				   assetModel : assetModel
+			   }));
+			   resourceListForAsset.fetch({
+				   cache : true
+			   });
+		   });   
+	   },
+	   knoxPolicyCreateAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/knox/KnoxPolicyCreate');
+		   var VXResource 		= require('models/VXResource');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   
+		   var assetModel = new VXAsset({id:assetId});
+		   var resource	  = new VXResource();
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   model : resource,
+			   		assetModel : assetModel
+			   }));
+		   });	   
+	   },
+	   knoxPolicyEditAction :function(assetId,id){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+    	   var VXResource 		= require('models/VXResource');
+    	   var VXResourceList 	= require('collections/VXResourceList');
+    	   var VXAsset 		  	= require('models/VXAsset');
+		   var view 			= require('views/knox/KnoxPolicyCreate');
+		   var resource 		= new VXResource({id : id });
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   resource.fetch({cache:true}).done(function(){
+			   assetModel.fetch({cache : true}).done(function(){
+				   App.rContent.show(new view({
+					   model : resource,
+					   assetModel : assetModel
+				   }));
+			   });
+		   });
+	   },
+	 //************** Policy Related ( STORM )*********************/
+	   stormManageAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/storm/StormTableLayout');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   
+		   var resourceListForAsset = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   collection  :resourceListForAsset,
+				   assetModel : assetModel
+			   }));
+			   resourceListForAsset.fetch({
+				   cache : true
+			   });
+		   });   
+	   },
+	   stormPolicyCreateAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/storm/StormPolicyCreate');
+		   var VXResource 		= require('models/VXResource');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   
+		   var assetModel = new VXAsset({id:assetId});
+		   var resource	  = new VXResource();
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   assetModel.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   model : resource,
+			   		assetModel : assetModel
+			   }));
+		   });	   
+	   },
+	   stormPolicyEditAction :function(assetId,id){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+    	   var VXResource 		= require('models/VXResource');
+    	   var VXResourceList 	= require('collections/VXResourceList');
+    	   var VXAsset 		  	= require('models/VXAsset');
+		   var view 			= require('views/storm/StormPolicyCreate');
+		   var resource 		= new VXResource({id : id });
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   resource.fetch({cache:true}).done(function(){
+			   assetModel.fetch({cache : true}).done(function(){
+				   App.rContent.show(new view({
+					   model : resource,
+					   assetModel : assetModel
+				   }));
+			   });
+		   });
+	   },
+	   //************** Asset Related ( Repository )*********************/
+	   assetCreateAction :function(assetType){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view		= require('views/asset/AssetCreate');
+		   var VXAsset	= require('models/VXAsset');
+		   App.rContent.show(new view({
+			   model : new VXAsset().set('assetType',assetType)
+		   }));
+	   },
+
+	   assetEditAction :function(id){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view		= require('views/asset/AssetCreate');
+		   var VXAsset	= require('models/VXAsset');
+
+		   var model = new VXAsset({id : id });
+		   model.fetch({cache:true}).done(function(){
+			   App.rContent.show(new view({
+				   model : model
+			   }));
+		   });
+	   },
+ //************** Policy Related ( HBASE)*********************/
+	   hbaseManageAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/hbase/HbaseTableLayout');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   var resourceListForAsset = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   assetModel.fetch({cache:true}).done(function(){
+			   App.rContent.show(new view({
+				   collection : resourceListForAsset,
+				   assetModel : assetModel
+			   }));
+			   resourceListForAsset.fetch({
+				   cache : true
+			   });
+		   });   
+		   
+	   },
+	   hbasePolicyCreateAction :function(assetId){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+		   var view 			= require('views/hbase/HbasePolicyCreate');
+		   var VXResource 		= require('models/VXResource');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXAsset 		  	= require('models/VXAsset');
+		   var resource	  		= new VXResource();
+		   resource.collection  = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   var assetModel = new VXAsset({id:assetId});
+		   assetModel.fetch({cache:true}).done(function(){
+			   App.rContent.show(new view({
+				   model : resource,
+			   		assetModel : assetModel
+			   }));
+		   }); 
+	   },
+	   hbasePolicyEditAction :function(assetId,id){
+    	   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.PolicyManager.value });
+    	   var VXResource 		= require('models/VXResource');
+    	   var VXResourceList 	= require('collections/VXResourceList');
+    	   var VXAsset 		  	= require('models/VXAsset');
+		   var view 			= require('views/hbase/HbasePolicyCreate');
+		   var resource 		= new VXResource({id : id });
+		   var assetModel 		= new VXAsset({id:assetId});
+
+		   resource.collection = new VXResourceList([],{
+			   queryParams : {
+				   'assetId' : assetId 
+			   }
+		   });
+		   resource.fetch({cache:true}).done(function(){
+			   assetModel.fetch({cache:true}).done(function(){
+				   App.rContent.show(new view({
+					   model : resource,
+					   assetModel : assetModel
+				   }));
+			   });
+		   });
+	   },
+
+	   //************** Analytics(reports)  Related *********************/
+	   userAccessReportAction : function(){
+		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.Analytics.value });
+		   var view				= require('views/reports/UserAccessLayout');
+		   var VXResourceList 	= require('collections/VXResourceList');
+		   var VXGroupList		= require('collections/VXGroupList');
+		   var VXUserList		= require('collections/VXUserList');
+		   var resourceList 	= new VXResourceList([],{
+			   queryParams : {
+				   //'resourceType' : XAEnums.AssetType.ASSET_HDFS.value,
+				   //'assetId' : assetId 
+			   }
+		   });
+		   var that 		= this;
+		   this.groupList 	= new VXGroupList();
+		   this.userList 	= new VXUserList();
+		   resourceList.setPageSize(200, {fetch : false});
+		   resourceList.fetch({
+			   async:false,
+			   cache : false
+		   }).done(function(){
+				that.groupList.fetch({
+						async:false,
+						cache:false
+					}).done(function(){
+					that.userList.fetch({
+						async:false,
+						cache:false
+					}).done(function(){
+						if(App.rContent.currentView)
+							   App.rContent.currentView.close();
+						App.rContent.show(new view({
+							collection : resourceList,
+							groupList :that.groupList,
+							userList :that.userList
+						}));
+					});
+				});
+		   });
+	   },
+	   auditReportAction : function(tab){
+		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.Audit.value });
+		   var view					= require('views/reports/AuditLayout');
+		   var VXAccessAuditList 	= require('collections/VXAccessAuditList');
+		   var accessAuditList 		= new VXAccessAuditList();
+		   App.rContent.show(new view({
+			   accessAuditList : accessAuditList,
+			   tab :tab
+		   }));
+		   if(tab == 'bigData'){
+			  accessAuditList.fetch({
+				 cache : false,
+				 async:true
+			   });
+		   }
+	   },
+	   loginSessionDetail : function(type, id){
+		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.Audit.value });
+		   var view					= require('views/reports/LoginSessionDetail');
+		   var VXAuthSessionList	= require('collections/VXAuthSessionList');
+		   var authSessionList 		= new VXAuthSessionList();
+		   authSessionList.fetch({
+			   data : {id : id}
+		   }).done(function(){
+			   App.rContent.show(new view({
+				   model : authSessionList.first()
+			   }));
+		   });
+	   },
+	   //************** UserProfile Related *********************/
+	   userProfileAction : function(){
+		   MAppState.set({ 'currentTab' : XAGlobals.AppTabs.None.value });
+		   var view				= require('views/user/UserProfile');
+		   
+		   App.rContent.show(new view({
+			   model : App.userProfile
+		   }));
+
+	   },
+	   
+	   /************** UserORGroups Related *********************/
+	   userManagerAction :function(tab){
+		   MAppState.set({
+				'currentTab' : XAGlobals.AppTabs.Users.value
+			});
+		   var view 		= require('views/users/UserTableLayout');
+		   var VXUserList	= require('collections/VXUserList');
+		   var userList 	= new VXUserList();
+		   
+		   App.rContent.show(new view({
+			   collection : userList,
+			   tab :tab
+		   }));
+		   userList.fetch({
+			   cache:true
+		   });
+	   },
+	   userCreateAction : function(){
+		   MAppState.set({
+				'currentTab' : XAGlobals.AppTabs.Users.value
+			});
+		   var view 		= require('views/users/UserCreate');
+		   var VXUser		= require('models/VXUser');
+		   var VXUserList	= require('collections/VXUserList');
+		   var VXGroupList	= require('collections/VXGroupList');
+
+		   var groupList = new VXGroupList();
+		   var user 	 = new VXUser();
+		   user.collection = new VXUserList();
+	   	   groupList.fetch({cache:true,async:false}).done(function(){
+			   App.rContent.show(new view({
+				   model : user,
+				   groupList :groupList
+			   }));
+		   });   
+	   },
+	   userEditAction : function(userId){
+		   MAppState.set({
+				'currentTab' : XAGlobals.AppTabs.Users.value
+			});
+		   var view 		= require('views/users/UserCreate');
+		   var VXUser		= require('models/VXUser');
+		   var VXUserList	= require('collections/VXUserList');
+		   var VXGroupList	= require('collections/VXGroupList');
+
+		   var groupList = new VXGroupList();
+		   var user 	 = new VXUser({id : userId});
+		   
+		   user.collection = new VXUserList();
+		   user.fetch({cache : true}).done(function(){
+			   	   groupList.fetch({cache : true ,async:false}).done(function(){
+				   App.rContent.show(new view({
+					   model : user,
+					   groupList :groupList
+				   }));
+			   });   
+		   });
+	   },
+	   groupCreateAction : function(){
+		   MAppState.set({
+				'currentTab' : XAGlobals.AppTabs.Users.value
+			});
+		   var view 		= require('views/users/GroupCreate');
+		   var VXGroup		= require('models/VXGroup');
+		   var VXGroupList	= require('collections/VXGroupList');
+		   
+		   var group 		= new VXGroup();
+		   group.collection = new VXGroupList();
+		   App.rContent.show(new view({
+			   model : group
+		   }));
+	   },
+	   groupEditAction : function(groupId){
+		   MAppState.set({
+				'currentTab' : XAGlobals.AppTabs.Users.value
+			});
+		   var view 		= require('views/users/GroupCreate');
+		   var VXGroup		= require('models/VXGroup');
+		   var VXGroupList	= require('collections/VXGroupList');
+		   
+		   var group 		= new VXGroup({id : groupId});
+		   group.collection = new VXGroupList();
+		   
+		   group.fetch({cache : true}).done(function(){
+			   App.rContent.show(new view({
+				   model : group
+			   }));
+		   });	   
+	   }
+	});
+});

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js b/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js
new file mode 100644
index 0000000..9362107
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/mgrs/SessionMgr.js
@@ -0,0 +1,128 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+// Manages the user session
+define(function(require){
+	'use strict';
+
+	var VXPortalUser		= require('models/VXPortalUser');
+
+	// Private properties
+	var vXPortalUser = null;
+	var vSessionSettings = null;
+
+	// Public methods
+	var SessionMgr = {};
+
+	/**
+	 * Gets the user profile for the given session
+	 * 
+	 * @returns VXPortalUser
+	 */
+
+	SessionMgr.getUserProfile = function() {
+		if ( vXPortalUser){
+			return vXPortalUser;
+		}
+
+		vXPortalUser = new VXPortalUser();
+		vXPortalUser.getUserProfile({async : false,cache:false}).done(function(data){
+			vXPortalUser.set(data);
+		});
+		return vXPortalUser;
+	};
+
+
+	SessionMgr.getLoginId = function() {
+		if (vXPortalUser) {
+			return vXPortalUser.get('loginId');
+		}
+	};
+
+	SessionMgr.userInRole = function(role) {
+		var vXPortalUser = SessionMgr.getUserProfile();
+		var userRoles = vXPortalUser.get('userRoleList');
+		if (!userRoles || !role) {
+			return false;
+		}
+		if (userRoles.constructor != Array) {
+			userRoles = [ userRoles ];
+		}
+
+		return (userRoles.indexOf(role) > -1);
+	};
+
+	SessionMgr.getUserRoles = function() {
+		var vXPortalUser = SessionMgr.getUserProfile();
+		var userRoles = vXPortalUser.get('userRoleList');
+		if (!userRoles) {
+			return [];
+		}
+		if (userRoles.constructor != Array) {
+			userRoles = [ userRoles ];
+		}
+
+		return userRoles;
+	};
+
+	SessionMgr.getSetting = function(key) {
+		if (!vSessionSettings) {
+			var msResponse = GeneralMgr.getSessionSettings();
+			if (msResponse.isSuccess()) {
+				vSessionSettings = msResponse.response;
+			}
+		}
+		var value = null;
+		if (vSessionSettings && key) {
+			vSessionSettings.each(function(vNameValue) {
+				if (vNameValue.get('name') == key) {
+					value = vNameValue.get('value');
+				}
+			});
+		}
+		return value;
+	};
+
+	SessionMgr.resetSession = function() {
+		vXPortalUser = null;
+		vSessionSettings = null;
+		MSCacheMgr.resetAll();
+	};
+
+	/**
+	 * Logs out the user and resets all session variables
+	 */
+	SessionMgr.logout = function(reDirectUser) {
+		SessionMgr.resetSession();
+		MSCacheMgr.resetAll();
+		if (reDirectUser) {
+			// This will ask the browser to redirect
+			window.location.replace("logout.html");
+		} else {
+			// We will do an implicit logout
+			$.ajax({
+				url : 'logout.html',
+				type : 'GET',
+				async : false
+			});
+		}
+	};
+
+	SessionMgr.isSystemAdmin = function(){
+		return this.userInRole('ROLE_SYS_ADMIN') ? true : false;
+	};
+	
+	SessionMgr.isUser = function(){
+		var roles = this.getRoleInUserSchool();
+		return  $.inArray('ROLE_USER',roles) != -1  ? true  : false ;
+	};
+	return SessionMgr;
+});	

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXAccessAuditBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXAccessAuditBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXAccessAuditBase.js
new file mode 100644
index 0000000..76e64e0
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXAccessAuditBase.js
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXGroupBase = XABaseModel.extend(
+	/** @lends VXGroupBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'xusers/authSessions',
+		
+		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"
+			},
+			"name" : {
+				"dataType" : "String"
+			},
+			"description" : {
+				"dataType" : "String"
+			},
+			"groupType" : {
+				"dataType" : "int"
+			},
+			"credStoreId" : {
+				"dataType" : "Long"
+			}
+		},
+		
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXGroupBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXGroupBase';
+		},
+		getSession : function(extSessionId,options){
+			var url = this.urlRoot  + '/' +'info?extSessionId='+extSessionId;
+			
+			options = _.extend({
+			//	data : JSON.stringify(postData),
+				contentType : 'application/json',
+				dataType : 'json'
+			}, options);
+
+			return this.constructor.nonCrudOperation.call(this, url, 'GET', options);
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXGroupBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXAssetBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXAssetBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXAssetBase.js
new file mode 100644
index 0000000..3fe2c94
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXAssetBase.js
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXAssetBase = XABaseModel.extend(
+	/** @lends VXAssetBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'assets/assets',
+		
+		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"
+			},
+			"name" : {
+				"dataType" : "String"
+			},
+			"description" : {
+				"dataType" : "String"
+			},
+			"activeStatus" : {
+				"dataType" : "int"
+			},
+			"assetType" : {
+				"dataType" : "int"
+			},
+			"config" : {
+				"dataType" : "String"
+			},
+			"supportNative" : {
+				"dataType" : "boolean"
+			}
+		},
+		
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXAssetBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXAssetBase';
+			//this.bind("error", XAUtils.defaultErrorHandler);
+			this.bindErrorEvents();
+		},
+		
+		testConfig : function(vAssest, options){
+			var url = this.urlRoot  + '/testConfig';
+			
+			options = _.extend({
+				data : JSON.stringify(vAssest),
+				contentType : 'application/json',
+				dataType : 'json'
+			}, options);
+
+			return this.constructor.nonCrudOperation.call(this, url, 'POST', options);
+		},
+		testKnoxCofig : function(vAssest, data, options){
+			var url = 'service/assets/knox/resources?dataSourceName='+data.dataSourceName;
+			
+			options = _.extend({
+//				data : JSON.stringify(data),
+				contentType : 'application/json',
+				dataType : 'json'
+			}, options);
+
+			return this.constructor.nonCrudOperation.call(this, url, 'GET', options);
+		},
+
+	}, {
+		// static class members
+	});
+
+    return VXAssetBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXAuditMapBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXAuditMapBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXAuditMapBase.js
new file mode 100644
index 0000000..def17bc
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXAuditMapBase.js
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXAuditMapBase = XABaseModel.extend(
+	/** @lends VXAuditMapBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'xusers/auditmaps',
+		
+		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"
+			},
+			"resourceId" : {
+				"dataType" : "Long"
+			},
+			"groupId" : {
+				"dataType" : "Long"
+			},
+			"userId" : {
+				"dataType" : "Long"
+			},
+			"auditType" : {
+				"dataType" : "int"
+			}
+		},
+		
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXAuditMapBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXAuditMapBase';
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXAuditMapBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/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
new file mode 100644
index 0000000..deadd96
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXAuditRecordBase.js
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+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-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXAuthSessionBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXAuthSessionBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXAuthSessionBase.js
new file mode 100644
index 0000000..d73c440
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXAuthSessionBase.js
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+
+	var VXAuthSessionBase = XABaseModel.extend(
+	/** @lends VXAuthSessionBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'xusers/authSessions',
+		
+		defaults: {},
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXAuthSessionBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'vXAuthSessionBase';
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXAuthSessionBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js
new file mode 100644
index 0000000..94fd384
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXGroupBase.js
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXGroupBase = XABaseModel.extend(
+	/** @lends VXGroupBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'xusers/secure/groups',
+		
+		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"
+			},
+			"name" : {
+				"dataType" : "String"
+			},
+			"description" : {
+				"dataType" : "String"
+			},
+			"groupType" : {
+				"dataType" : "int"
+			},
+			"credStoreId" : {
+				"dataType" : "Long"
+			}
+		},
+		
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXGroupBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXGroupBase';
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXGroupBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXPasswordChangeBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXPasswordChangeBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXPasswordChangeBase.js
new file mode 100644
index 0000000..50c54ae
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXPasswordChangeBase.js
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure
+ */
+
+define(function(require){
+	var XABaseModel = require('models/XABaseModel');
+	var XAEnums 	= require('utils/XAEnums');
+
+	return XABaseModel.extend({
+		initialize : function() {
+			this.modelName = 'VPasswordChange';
+			this.myClassType = XAEnums.ClassTypes.CLASS_TYPE_PASSWORD_CHANGE.value;
+		}
+	});
+
+});
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXPermMapBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXPermMapBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXPermMapBase.js
new file mode 100644
index 0000000..c50642f
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXPermMapBase.js
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXPermMapBase = XABaseModel.extend(
+	/** @lends VXPermMapBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'xusers/permmaps',
+		
+		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"
+			},
+			"resourceId" : {
+				"dataType" : "Long"
+			},
+			"groupId" : {
+				"dataType" : "Long"
+			},
+			"userId" : {
+				"dataType" : "Long"
+			},
+			"permFor" : {
+				"dataType" : "int"
+			},
+			"permType" : {
+				"dataType" : "int"
+			},
+			"grantOrRevoke" : {
+				"dataType" : "boolean"
+			}
+		},
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXPermMapBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXPermMapBase';
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXPermMapBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXPolicyExportAuditBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXPolicyExportAuditBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXPolicyExportAuditBase.js
new file mode 100644
index 0000000..7f5750e
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXPolicyExportAuditBase.js
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXPolicyExportAuditBase = XABaseModel.extend(
+	/** @lends VXGroupBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'assets/exportAudit',
+		
+		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"
+			},
+			"name" : {
+				"dataType" : "String"
+			},
+			"description" : {
+				"dataType" : "String"
+			},
+			"groupType" : {
+				"dataType" : "int"
+			},
+			"credStoreId" : {
+				"dataType" : "Long"
+			}
+		},
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXGroupBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXPolicyExportAuditBase';
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXPolicyExportAuditBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXPortalUserBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXPortalUserBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXPortalUserBase.js
new file mode 100644
index 0000000..5979dbc
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXPortalUserBase.js
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXPortalUserBase = XABaseModel.extend(
+	/** @lends VXPortalUserBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'users',
+		
+		defaults: {},
+
+		serverSchema : {
+			"id" : {
+				"dataType" : "Long"
+			},
+			"version" : {
+				"dataType" : "int"
+			},
+			"createDate" : {
+				"dataType" : "Date"
+			},
+			"updateDate" : {
+				"dataType" : "Date"
+			},
+			"permList" : {
+				"dataType" : "list",
+				"listType" : "VNameValue"
+			},
+			"forUserId" : {
+				"dataType" : "Long"
+			},
+			"loginId" : {
+				"dataType" : "String"
+			},
+			"password" : {
+				"dataType" : "String"
+			},
+			"profileImageGId" : {
+				"dataType" : "Long"
+			},
+			"status" : {
+				"dataType" : "int"
+			},
+			"emailAddress" : {
+				"dataType" : "String"
+			},
+			"isTestUser" : {
+				"dataType" : "boolean"
+			},
+			"isRegistered" : {
+				"dataType" : "boolean"
+			},
+			"isInternal" : {
+				"dataType" : "boolean"
+			},
+			"gender" : {
+				"dataType" : "int"
+			},
+			"firstName" : {
+				"dataType" : "String"
+			},
+			"lastName" : {
+				"dataType" : "String"
+			},
+			"publicScreenName" : {
+				"dataType" : "String"
+			},
+			"userSource" : {
+				"dataType" : "int"
+			},
+			"timeZone" : {
+				"dataType" : "String"
+			},
+			"userRoleList" : {
+				"dataType" : "list",
+				"listType" : "String"
+			}
+		},
+		
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXPortalUserBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXPortalUserBase';
+			this.bindErrorEvents();
+		},
+
+		/*************************
+		 * Non - CRUD operations
+		 *************************/
+
+		getUserProfile: function(options) {
+			return this.constructor.nonCrudOperation.call(this, this.urlRoot + '/profile', 'GET', options);
+		},
+
+		setUserRoles : function(userId, postData , options){
+			var url = this.urlRoot  + '/' + userId + '/roles';
+			
+			options = _.extend({
+				data : JSON.stringify(postData),
+				contentType : 'application/json',
+				dataType : 'json'
+			}, options);
+
+			return this.constructor.nonCrudOperation.call(this, url, 'PUT', options);
+		},
+		changePassword : function(userId, postData , options){
+			var url = this.urlRoot  + '/' + userId + '/passwordchange';
+			
+			options = _.extend({
+				data : JSON.stringify(postData),
+				contentType : 'application/json',
+				dataType : 'json'
+			}, options);
+
+			return this.constructor.nonCrudOperation.call(this, url, 'POST', options);
+		},
+		saveUserProfile : function(vXPortalUser, options){
+			var url = this.urlRoot ;
+			
+			options = _.extend({
+				data : JSON.stringify(vXPortalUser),
+				contentType : 'application/json',
+				dataType : 'json'
+			}, options);
+
+			return this.constructor.nonCrudOperation.call(this, url, 'PUT', options);
+		}
+		
+	}, {
+		// static class members
+	});
+
+    return VXPortalUserBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXResourceBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXResourceBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXResourceBase.js
new file mode 100644
index 0000000..befe60b
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXResourceBase.js
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+
+	var VXResourceBase = XABaseModel.extend(
+	/** @lends VXResourceBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'assets/resources',
+		
+		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"
+			},
+			"name" : {
+				"dataType" : "String"
+			},
+			"description" : {
+				"dataType" : "String"
+			},
+			"resourceType" : {
+				"dataType" : "int"
+			},
+			"assetId" : {
+				"dataType" : "Long"
+			},
+			"parentId" : {
+				"dataType" : "Long"
+			},
+			"parentPath" : {
+				"dataType" : "String"
+			},
+			"isEncrypt" : {
+				"dataType" : "int"
+			},
+			"permMapList" : {
+				"dataType" : "list",
+				"listType" : "VXPermMap"
+			},
+			"auditList" : {
+				"dataType" : "list",
+				"listType" : "VXAuditMap"
+			}
+		},
+		
+		idAttribute: 'id',
+
+		/*modelRel: {
+			permMapList: VXPermMapList,
+		},*/
+		//localStorage: new Backbone.LocalStorage("VXResourceModel"),
+
+		/**
+		 * VXResourceBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXResourceBase';
+			//this.permMapList = this.constructor.nestCollection(this, 'permMapList', new VXPermMapList(this.get('permMapList')));
+			//this.auditList = this.constructor.nestCollection(this, 'auditList', new VXAuditMapList(this.get('auditList')));
+			
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXResourceBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXTrxLogBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXTrxLogBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXTrxLogBase.js
new file mode 100644
index 0000000..175f696
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXTrxLogBase.js
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VXTrxLogBase = XABaseModel.extend(
+	/** @lends VXTrxLogBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + '/assets/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"
+			},
+			"name" : {
+				"dataType" : "String"
+			},
+			"description" : {
+				"dataType" : "String"
+			},
+			"groupType" : {
+				"dataType" : "int"
+			},
+			"credStoreId" : {
+				"dataType" : "Long"
+			}
+		},
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXTrxLogBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXTrxLogBase';
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXTrxLogBase;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js b/security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js
new file mode 100644
index 0000000..25e1d77
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/model_bases/VXUserBase.js
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+
+	var VXUserBase = XABaseModel.extend(
+	/** @lends VXUserBase.prototype */
+	{
+		urlRoot: XAGlobals.baseURL + 'xusers/secure/users',
+		
+		defaults: {},
+		
+		idAttribute: 'id',
+
+		/**
+		 * VXUserBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXUserBase';
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXUserBase;
+	
+});

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VAppState.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VAppState.js b/security-admin/src/main/webapp/scripts/models/VAppState.js
new file mode 100644
index 0000000..66ffd97
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VAppState.js
@@ -0,0 +1,34 @@
+ /*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+/*
+ * The singleton class for App State model to be used globally
+ */
+
+define(function(require) {
+	'use strict';
+	var XABaseModel	= require('models/XABaseModel');
+	var XAGlobals	= require('utils/XAGlobals');
+
+	var VAppState = XABaseModel.extend({
+		defaults : {
+			currentTab : XAGlobals.AppTabs.Dashboard.value
+		},
+		initialize : function() {
+			this.modelName = 'VAppState';
+		//	this.listenTo(this, 'change:currentAccount', this.accountChanged);
+		}
+		
+	});
+
+	// Make this a singleton!!
+	return new VAppState();
+});
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXAccessAudit.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXAccessAudit.js b/security-admin/src/main/webapp/scripts/models/VXAccessAudit.js
new file mode 100644
index 0000000..630b987
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXAccessAudit.js
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXAccessAuditBase	= require('model_bases/VXAccessAuditBase');
+	
+	var VXAccessAudit = VXAccessAuditBase.extend(
+	/** @lends VXAccessAudit.prototype */
+	{
+		/**
+		 * VXAccessAudit initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXAccessAudit';
+			this.bindErrorEvents();
+			
+		},
+		/** This models toString() */
+		toString : function(){
+			return /*this.get('name')*/;
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXAccessAudit;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXAsset.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXAsset.js b/security-admin/src/main/webapp/scripts/models/VXAsset.js
new file mode 100644
index 0000000..3cfeecb
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXAsset.js
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXAssetBase	= require('model_bases/VXAssetBase');
+	var XAUtils		= require('utils/XAUtils');
+	var XAEnums		= require('utils/XAEnums');
+	var localization= require('utils/XALangSupport');
+
+	var VXAsset = VXAssetBase.extend(
+	/** @lends VXAsset.prototype */
+	{
+		/**
+		 * VXAsset initialize method
+		 * @augments VXAssetBase
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXAsset';
+			this.bindErrorEvents();
+		},
+		/**
+		 * @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		: 'Repository Name *',
+					validators	: ['required'],
+					editorAttrs 	:{ maxlength: 255},
+				},
+				description : {
+					type		: 'TextArea',
+					title		: 'Description',
+					validators	: []
+				},
+				activeStatus : {
+			        type: 'Radio',
+					options : function(callback, editor){
+						var activeStatus = _.filter(XAEnums.ActiveStatus,function(m){return m.label != 'Deleted'});
+						var nvPairs = XAUtils.enumToSelectPairs(activeStatus);
+						callback(_.sortBy(nvPairs, function(n){ return !n.val; }));
+					}
+				},
+				assetType : {
+					type : 'Select',
+					options : function(callback, editor){
+						var assetTypes = _.filter(XAEnums.AssetType,function(m){return m.label != 'Unknown'});
+						var nvPairs = XAUtils.enumToSelectPairs(assetTypes);
+						callback(nvPairs);
+					},
+					title : localization.tt('lbl.assetType'),
+					editorAttrs:{'disabled' : true}
+				}
+
+			});
+		},
+
+		/** This models toString() */
+		toString : function(){
+			return this.get('name');
+		},
+		propertiesNameMap : {
+			userName : "username",
+			passwordKeytabfile : "password",
+			fsDefaultName : "fs.default.name",
+			authorization : "hadoop.security.authorization",
+			authentication : "hadoop.security.authentication",
+			auth_to_local : "hadoop.security.auth_to_local",
+			datanode : "dfs.datanode.kerberos.principal",
+			namenode : "dfs.namenode.kerberos.principal",
+			secNamenode : "dfs.secondary.namenode.kerberos.principal",
+			//hive
+			driverClassName : "jdbc.driverClassName",
+			url	: "jdbc.url",
+			
+			masterKerberos     		: 'hbase.master.kerberos.principal',
+			rpcEngine 				: 'hbase.rpc.engine',
+			rpcProtection	 		: 'hbase.rpc.protection',
+			securityAuthentication  : 'hbase.security.authentication',
+			zookeeperProperty 		: 'hbase.zookeeper.property.clientPort',
+			zookeeperQuorum 		: 'hbase.zookeeper.quorum',
+			//hbase
+			zookeeperZnodeParent	: 'zookeeper.znode.parent',
+			//knox
+			knoxUrl					:'knox.url',
+			
+			commonnameforcertificate: 'commonNameForCertificate'
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXAsset;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXAuditMap.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXAuditMap.js b/security-admin/src/main/webapp/scripts/models/VXAuditMap.js
new file mode 100644
index 0000000..cd0aa80
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXAuditMap.js
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXAuditMapBase	= require('model_bases/VXAuditMapBase');
+
+	var VXAuditMap = VXAuditMapBase.extend(
+	/** @lends VXAuditMap.prototype */
+	{
+		/**
+		 * @function schema
+		 * This method is meant to be used by UI,
+		 * by default we will remove the unrequired attributes from serverSchema
+		 */
+
+		schema : function(){
+			return _.omit(this.serverSchema, 'id', 'createDate', 'updateDate', "version",
+					"createDate", "updateDate", "displayOption",
+					"permList", "forUserId", "status", "priGrpId",
+					"isSystem","updatedBy");
+		},
+		/** This models toString() */
+		toString : function(){
+			return /*this.get('name')*/;
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXAuditMap;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/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
new file mode 100644
index 0000000..b42fa7b
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXAuditRecord.js
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+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-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXAuthSession.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXAuthSession.js b/security-admin/src/main/webapp/scripts/models/VXAuthSession.js
new file mode 100644
index 0000000..a1ad09e
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXAuthSession.js
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXAuthSessionBase	= require('model_bases/VXAuthSessionBase');
+
+	var VXAuthSession = VXAuthSessionBase.extend(
+	/** @lends VXAuthSession.prototype */
+	{
+		/**
+		 * VXAuthSessionBase initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXAuthSession';
+			this.bindErrorEvents();
+		},
+		
+		/** This models toString() */
+		toString : function(){
+			return this.get('name');
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXAuthSession;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/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
new file mode 100644
index 0000000..e3cd9b9
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXGroup.js
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXGroupBase		= require('model_bases/VXGroupBase');
+	var localization	= require('utils/XALangSupport');
+	
+	var VXGroup = VXGroupBase.extend(
+	/** @lends VXGroup.prototype */
+	{
+		/**
+		 * VXGroup initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXGroup';
+			this.bindErrorEvents();
+			
+		},
+		/**
+		 * @function schema
+		 * This method is meant to be used by UI,
+		 * by default we will remove the unrequired attributes from serverSchema
+		 */
+
+		schema : function(){
+			var attrs = _.omit(this.serverSchema, 'id', 'createDate', 'updateDate', "version",
+					"createDate", "updateDate", "displayOption",
+					"permList", "forUserId", "status", "priGrpId",
+					"priAcctId", "updatedBy",
+					"isSystem","credStoreId","description","groupType");
+			
+			return _.extend(attrs,{
+				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.'}],
+					editorAttrs 	:{ 'maxlength': 32},
+				},
+				description : {
+					type		: 'TextArea',
+					title		: localization.tt("lbl.description")
+				}
+			});	
+		},
+
+		/*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 VXGroup;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXPasswordChange.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXPasswordChange.js b/security-admin/src/main/webapp/scripts/models/VXPasswordChange.js
new file mode 100644
index 0000000..b817256
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXPasswordChange.js
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure
+ */
+
+define(function(require) {
+	var VXPasswordChange = require('model_bases/VXPasswordChangeBase');
+
+	return VXPasswordChange.extend({
+	});
+});
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXPermMap.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXPermMap.js b/security-admin/src/main/webapp/scripts/models/VXPermMap.js
new file mode 100644
index 0000000..54c21b1
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXPermMap.js
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXPermMapBase	= require('model_bases/VXPermMapBase');
+
+	var VXPermMap = VXPermMapBase.extend(
+	/** @lends VXPermMap.prototype */
+	{
+		/**
+		 * @function schema
+		 * This method is meant to be used by UI,
+		 * by default we will remove the unrequired attributes from serverSchema
+		 */
+
+		schema : function(){
+			return _.omit(this.serverSchema, 'id', 'createDate', 'updateDate', "version",
+					"createDate", "updateDate", "displayOption",
+					"permList", "forUserId", "status", "priGrpId",
+					"updatedBy","isSystem");
+		},
+
+		/** This models toString() */
+		toString : function(){
+			return /*this.get('name')*/;
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXPermMap;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXPolicyExportAudit.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXPolicyExportAudit.js b/security-admin/src/main/webapp/scripts/models/VXPolicyExportAudit.js
new file mode 100644
index 0000000..e2fed55
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXPolicyExportAudit.js
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXPolicyExportAuditBase	= require('model_bases/VXPolicyExportAuditBase');
+	
+	var VXPolicyExportAudit = VXPolicyExportAuditBase.extend(
+	/** @lends VXGroup.prototype */
+	{
+		/**
+		 * VXGroup initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXPolicyExportAudit';
+			this.bindErrorEvents();
+			
+		},
+		/**
+		 * @function schema
+		 * This method is meant to be used by UI,
+		 * by default we will remove the unrequired attributes from serverSchema
+		 */
+
+		
+		/** This models toString() */
+		toString : function(){
+			return /*this.get('name')*/;
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXPolicyExportAudit;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/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
new file mode 100644
index 0000000..25a2dec
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXPortalUser.js
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXPortalUserBase	= require('model_bases/VXPortalUserBase');
+	var XAEnums			= require('utils/XAEnums');
+	var XAUtils			= require('utils/XAUtils');
+	var localization		= require('utils/XALangSupport');
+	
+	var VXPortalUser = VXPortalUserBase.extend(
+	/** @lends VXPortalUser.prototype */
+	{
+		/**
+		 * @function schema
+		 * This method is meant to be used by UI,
+		 * by default we will remove the unrequired attributes from serverSchema
+		 */
+
+		schema : 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,{
+				firstName : {
+					type		: 'Text',
+					title		: localization.tt("lbl.firstName")+' *',
+					validators  : ['required',{type:'regexp',regexp:/^[a-z][a-z0-9]+$/i,message :'Please enter valid name'}],
+					editorAttrs : { 'placeholder' : localization.tt("lbl.firstName")}
+					
+				},
+				lastName : {
+					type		: 'Text',
+					title		: localization.tt("lbl.lastName")+' *',
+					validators  : ['required',{type:'regexp',regexp:/^[a-z][a-z0-9]+$/i,message :'Please enter valid name'}],
+					editorAttrs : { 'placeholder' : localization.tt("lbl.lastName")}
+				},
+				emailAddress : {
+					type		: 'Text',
+					title		: localization.tt("lbl.emailAddress"),
+					validators  : ['email'],
+					editorAttrs : { 'placeholder' : localization.tt("lbl.emailAddress")}//'disabled' : true}
+					
+				},
+				oldPassword : {
+					type		: 'Password',
+					title		: localization.tt("lbl.oldPassword")+' *',
+				//	validators  : ['required'],
+					fieldAttrs : {style : 'display:none;'},
+					editorAttrs : { 'placeholder' : localization.tt("lbl.oldPassword"),'onpaste':'return false;','oncopy':'return false;'}
+					
+				},
+				newPassword : {
+					type		: 'Password',
+					title		: localization.tt("lbl.newPassword")+' *',
+				//	validators  : ['required'],
+					fieldAttrs : {style : 'display:none;'},
+					editorAttrs : { 'placeholder' : localization.tt("lbl.newPassword"),'onpaste':'return false;','oncopy':'return false;'}
+					
+				},
+				reEnterPassword : {
+					type		: 'Password',
+					title		: localization.tt("lbl.reEnterPassword")+' *',
+				//	validators  : ['required'],
+					fieldAttrs : {style : 'display:none;'},
+					editorAttrs : { 'placeholder' : localization.tt("lbl.reEnterPassword"),'onpaste':'return false;','oncopy':'return false;'}
+					
+				},
+				userRoleList : {
+					type : 'Select',
+					options : function(callback, editor){
+						var userTypes = _.filter(XAEnums.UserRoles,function(m){return m.label != 'Unknown'});
+						var nvPairs = XAUtils.enumToSelectPairs(userTypes);
+						callback(nvPairs);
+					},
+					title : localization.tt('lbl.selectRole')+' *',
+					editorAttrs : {disabled:'disabled'},
+				}
+			});
+		},
+		/** This models toString() */
+		toString : function(){
+			return /*this.get('name')*/;
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXPortalUser;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXResource.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXResource.js b/security-admin/src/main/webapp/scripts/models/VXResource.js
new file mode 100644
index 0000000..83d5035
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXResource.js
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXResourceBase	= require('model_bases/VXResourceBase');
+
+	var VXResource = VXResourceBase.extend(
+	/** @lends VXResource.prototype */
+	{
+		
+		/**
+		 * VXResource initialize method
+		 * @augments FSBaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXResource';
+			this.bindErrorEvents();
+		},
+		
+		/** This models toString() */
+		toString : function(){
+			return this.get('name');
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXResource;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXTrxLog.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXTrxLog.js b/security-admin/src/main/webapp/scripts/models/VXTrxLog.js
new file mode 100644
index 0000000..e1cca35
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXTrxLog.js
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXTrxLogBase	= require('model_bases/VXTrxLogBase');
+	
+	var VXTrxLog = VXTrxLogBase.extend(
+	/** @lends VXTrxLog.prototype */
+	{
+		/**
+		 * VXTrxLog initialize method
+		 * @augments XABaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXTrxLog';
+			this.bindErrorEvents();
+			
+		},
+
+		/** This models toString() */
+		toString : function(){
+			return /*this.get('name')*/;
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXTrxLog;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/VXUser.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/VXUser.js b/security-admin/src/main/webapp/scripts/models/VXUser.js
new file mode 100644
index 0000000..aba7041
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/VXUser.js
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+define(function(require){
+	'use strict';	
+
+	var VXUserBase	= require('model_bases/VXUserBase');
+
+	var VXUser = VXUserBase.extend(
+	/** @lends VXUser.prototype */
+	{
+		/**
+		 * VXUserBase initialize method
+		 * @augments FSBaseModel
+		 * @constructs
+		 */
+		initialize: function() {
+			this.modelName = 'VXUser';
+			this.bindErrorEvents();
+		},
+		
+		/** This models toString() */
+		toString : function(){
+			return this.get('name');
+		}
+
+	}, {
+		// static class members
+	});
+
+    return VXUser;
+	
+});
+
+

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/models/XABaseModel.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/models/XABaseModel.js b/security-admin/src/main/webapp/scripts/models/XABaseModel.js
new file mode 100644
index 0000000..9ba21c3
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/models/XABaseModel.js
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2014 XASecure
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information of
+ * XASecure. ("Confidential Information").  You shall not
+ * disclose such Confidential Information and shall use it only in
+ * accordance with the terms of the license agreement you entered into
+ * with XASecure.
+ */
+
+/**
+ *
+ * Base Model file from which all models will extend/derive.
+ */
+
+define(function(require){
+	'use strict';
+
+	var Backbone = require('backbone');
+	var XAUtils	= require('utils/XAUtils');
+	
+	var XABaseModel = Backbone.Model.extend(
+	/** @lends XABaseModel.prototype */
+	{
+		/**
+		 * XABaseModel's initialize function
+		 * @augments Backbone.Model
+		 * @constructs
+		 */
+		initialize : function() {
+			
+		},
+		bindErrorEvents :function(){
+			this.bind("error", XAUtils.defaultErrorHandler);
+		},
+		/**
+		 * toString for a model. Every model should implement this function.
+		 */
+		toString : function() {
+			throw new Error('ERROR: toString() not defined for ' + this.modelName);
+		},
+
+		/**
+		 * Silent'ly set the attributes. ( do not trigger events )
+		 */
+		silent_set: function(attrs) {
+			return this.set(attrs, {
+				silent: true
+			});
+		},
+		parse: function(response){
+			for(var key in this.modelRel)
+				{
+					var embeddedClass = this.modelRel[key];
+					var embeddedData = response[key];
+					response[key] = new embeddedClass(embeddedData);
+				}
+				return response;
+		}
+
+	}, {
+		nestCollection : function(model, attributeName, nestedCollection) {
+			//setup nested references
+			for (var i = 0; i < nestedCollection.length; i++) {
+				model.attributes[attributeName][i] = nestedCollection.at(i).attributes;
+			}
+			//create empty arrays if none
+
+			nestedCollection.bind('add', function (initiative) {
+				if (!model.get(attributeName)) {
+					model.attributes[attributeName] = [];
+				}
+				model.get(attributeName).push(initiative.attributes);
+			});
+
+			nestedCollection.bind('remove', function (initiative) {
+				var updateObj = {};
+				updateObj[attributeName] = _.without(model.get(attributeName), initiative.attributes);
+				model.set(updateObj);
+			});
+
+			model.parse = function(response) {
+				if (response && response[attributeName]) {
+					model[attributeName].reset(response[attributeName]);
+				}
+				return Backbone.Model.prototype.parse.call(model, response);
+			}
+			return nestedCollection;
+		},
+
+		nonCrudOperation : function(url, requestMethod, options){
+			return Backbone.sync.call(this, null, this, _.extend({
+				url: url,
+				type: requestMethod
+			}, options));
+		}
+	});
+
+	return XABaseModel;
+});

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/7defc061/security-admin/src/main/webapp/scripts/modules/Vent.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/modules/Vent.js b/security-admin/src/main/webapp/scripts/modules/Vent.js
new file mode 100644
index 0000000..36d5dd0
--- /dev/null
+++ b/security-admin/src/main/webapp/scripts/modules/Vent.js
@@ -0,0 +1,7 @@
+
+define([
+    'backbone.wreqr'
+], function(Wreqr) {
+    "use strict";
+    return new Wreqr.EventAggregator();
+});


Mime
View raw message