ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sneet...@apache.org
Subject git commit: ARGUS-52:Policy UI enhancements
Date Mon, 15 Sep 2014 13:52:08 GMT
Repository: incubator-argus
Updated Branches:
  refs/heads/master c3513b23e -> 5975d2816


ARGUS-52:Policy UI enhancements

Signed-off-by: sneethiraj <sneethir@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-argus/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-argus/commit/5975d281
Tree: http://git-wip-us.apache.org/repos/asf/incubator-argus/tree/5975d281
Diff: http://git-wip-us.apache.org/repos/asf/incubator-argus/diff/5975d281

Branch: refs/heads/master
Commit: 5975d2816fa77dbb3ee5a95138fbc90b055fa683
Parents: c3513b2
Author: vperiasamy <vperiasamy@hortonworks.com>
Authored: Sun Sep 14 23:33:42 2014 -0400
Committer: sneethiraj <sneethir@apache.org>
Committed: Mon Sep 15 09:51:37 2014 -0400

----------------------------------------------------------------------
 .../scripts/modules/globalize/message/en.js     |  3 ++-
 .../src/main/webapp/scripts/utils/XAUtils.js    | 24 ++++++++++++++++++++
 .../scripts/views/hbase/HbasePolicyCreate.js    |  4 +++-
 .../scripts/views/hbase/HbasePolicyForm.js      |  8 +++----
 .../scripts/views/hbase/HbaseTableLayout.js     |  7 +++---
 .../scripts/views/hdfs/HDFSTableLayout.js       |  7 +++---
 .../scripts/views/hive/HivePolicyCreate.js      |  4 +++-
 .../scripts/views/hive/HiveTableLayout.js       |  7 +++---
 .../scripts/views/knox/KnoxPolicyCreate.js      |  4 +++-
 .../scripts/views/knox/KnoxTableLayout.js       |  7 +++---
 .../webapp/scripts/views/policy/PolicyCreate.js |  4 +++-
 .../scripts/views/storm/StormPolicyCreate.js    |  4 +++-
 .../scripts/views/storm/StormTableLayout.js     |  7 +++---
 .../scripts/views/users/UserTableLayout.js      | 12 +++++-----
 security-admin/src/main/webapp/styles/xa.css    | 12 +++++++++-
 .../templates/hbase/HbasePolicyCreate_tmpl.html |  5 +++-
 .../templates/hbase/HbasePolicyForm_tmpl.html   |  5 ++--
 .../templates/hbase/HbaseTableLayout_tmpl.html  |  6 ++---
 .../templates/hdfs/HDFSTableLayout_tmpl.html    |  8 +++----
 .../templates/hdfs/PolicyCreate_tmpl.html       |  4 ++++
 .../webapp/templates/hdfs/PolicyForm_tmpl.html  |  5 ++--
 .../templates/hive/HivePolicyCreate_tmpl.html   |  5 +++-
 .../templates/hive/HivePolicyForm_tmpl.html     |  5 ++--
 .../templates/hive/HiveTableLayout_tmpl.html    |  6 ++---
 .../templates/knox/KnoxPolicyCreate_tmpl.html   |  5 +++-
 .../templates/knox/KnoxPolicyForm_tmpl.html     |  5 ++--
 .../templates/knox/KnoxTableLayout_tmpl.html    |  6 ++---
 .../templates/storm/StormPolicyCreate_tmpl.html |  5 +++-
 .../templates/storm/StormPolicyForm_tmpl.html   |  5 ++--
 .../templates/storm/StormTableLayout_tmpl.html  |  6 ++---
 .../templates/users/UserTableLayout_tmpl.html   |  6 ++---
 31 files changed, 136 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/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 ba30aca..937c0ee 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
@@ -284,7 +284,8 @@ define(function(require) {
 				areSureWantToLogout		  : 'Are you sure want to logout ?',
 				groupDoesNotExistAnymore  : 'Group does not exist anymore..',
 				userDoesNotExistAnymore   : 'User does not exist anymore..',
-				repoDoesNotExistAnymore   : 'Repository does not exist anymore..'
+				repoDoesNotExistAnymore   : 'Repository does not exist anymore..',
+				policyDisabledMsg		  : 'This policy is currently in disabled state.',
 				
 				
 				

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/utils/XAUtils.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/utils/XAUtils.js b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
index eff9ba6..02cccf4 100644
--- a/security-admin/src/main/webapp/scripts/utils/XAUtils.js
+++ b/security-admin/src/main/webapp/scripts/utils/XAUtils.js
@@ -646,5 +646,29 @@ define(function(require) {
 		           'XA_PERM_TYPE_GET_TOPOLOGY','XA_PERM_TYPE_GET_USER_TOPOLOGY','XA_PERM_TYPE_GET_TOPOLOGY_INFO','XA_PERM_TYPE_UPLOAD_NEW_CREDENTIAL'
 		           ];
 	};
+
+	XAUtils.highlightDisabledPolicy = function(that){
+		var $el = that.rTableList.$el;
+		var timerId = setInterval(function(){
+			if($el.find('tr td:last').text() != "No Policies found!"){
+				_.each($el.find('tr td').find('.label-important'),function(a,b){
+					  if($(a).html() == "Disabled")
+					      console.log(that.$(a).parents('tr').addClass('disable-policy'))
+				},that);	
+				clearInterval(timerId);
+			}
+			console.log('highlight disabled policy..');
+		},5);
+	};
+	XAUtils.showAlerForDisabledPolicy = function(that){
+		if(!_.isUndefined(that.model.get('resourceStatus')) 
+			&& that.model.get('resourceStatus') == XAEnums.ActiveStatus.STATUS_DISABLED.value){
+			that.ui.policyDisabledAlert.show();
+			that.$(that.rForm.el).addClass("policy-disabled");
+		}else{
+			that.ui.policyDisabledAlert.hide();
+			that.$(that.rForm.el).removeClass("policy-disabled");
+		}
+	};
     return XAUtils;
 });

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyCreate.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyCreate.js b/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyCreate.js
index 1bc54af..0bcb141 100644
--- a/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyCreate.js
+++ b/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyCreate.js
@@ -59,7 +59,8 @@ define(function(require){
     	ui: {
     		'btnSave'	: '[data-id="save"]',
 			'btnCancel' : '[data-id="cancel"]',
-			'btnDelete' : '[data-id="delete"]'
+			'btnDelete' : '[data-id="delete"]',
+			'policyDisabledAlert' : '[data-id="policyDisabledAlert"]'
     	},
 
 		/** ui events hash */
@@ -99,6 +100,7 @@ define(function(require){
 
 		/** on render callback */
 		onRender: function() {
+			XAUtil.showAlerForDisabledPolicy(this);
 			this.rForm.show(this.form);
 			this.rForm.$el.dirtyFields();
 			XAUtil.preventNavigation(localization.tt('dialogMsg.preventNavHbasePolicyForm'), this.rForm.$el);

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyForm.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyForm.js b/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyForm.js
index ac7f8ca..8793077 100644
--- a/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyForm.js
+++ b/security-admin/src/main/webapp/scripts/views/hbase/HbasePolicyForm.js
@@ -134,12 +134,12 @@ define(function(require){
 					
 				},
 				columns : {
-					//type		: 'Select2Remote',
-					type		: 'Text',
+					type		: 'Select2Remote',
+//					type		: 'Text',
 					title		: localization.tt("lbl.enterColumnName"),
 		//			validators  : [{type:'regexp',regexp:/^[a-zA-Z*?][a-zA-Z0-9_'&-/\$]*[A-Za-z0-9]*$/i,message
:localization.tt('validationMessages.enterValidName')}],
-					editorAttrs :{ 'placeholder': 'Enter Column Name'}
-					//pluginAttr  : this.getPlugginAttr(true,this.type.COLUMN),
+					editorAttrs :{ 'placeholder': 'Enter Column Name'},
+					pluginAttr  : this.getPlugginAttr(false,this.type.COLUMN),
 				},
 				_vAuditListToggle : {
 					type		: 'Switch',

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/hbase/HbaseTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/hbase/HbaseTableLayout.js b/security-admin/src/main/webapp/scripts/views/hbase/HbaseTableLayout.js
index ba95bc7..4db270a 100644
--- a/security-admin/src/main/webapp/scripts/views/hbase/HbaseTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/hbase/HbaseTableLayout.js
@@ -113,10 +113,11 @@ define(function(require){
 			this.initializePlugins();
 			this.addVisualSearch();
 			this.renderTable();
+			XAUtil.highlightDisabledPolicy(this);
 		},
 		renderTable : function(){
 			var that = this;
-			var tableRow = Backgrid.Row.extend({
+			/*var tableRow = Backgrid.Row.extend({
 				events: {
 					'click' : 'onClick'
 				},
@@ -145,13 +146,13 @@ define(function(require){
 						
 					}
 				}
-			});
+			});*/
 			this.rTableList.show(new XATableLayout({
 				columns: this.getColumns(),
 				collection: this.collection,
 				includeFilter : false,
 				gridOpts : {
-					row: tableRow,
+//					row: tableRow,
 					header : XABackgrid,
 					emptyText : 'No Policies found!'
 				}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/hdfs/HDFSTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/hdfs/HDFSTableLayout.js b/security-admin/src/main/webapp/scripts/views/hdfs/HDFSTableLayout.js
index 423c32f..8bb2abc 100644
--- a/security-admin/src/main/webapp/scripts/views/hdfs/HDFSTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/hdfs/HDFSTableLayout.js
@@ -115,6 +115,7 @@ define(function(require){
 			this.initializePlugins();
 			this.addVisualSearch();
 			this.renderTable();
+			XAUtil.highlightDisabledPolicy(this);
 		},
 
 		/** all post render plugin initialization */
@@ -122,7 +123,7 @@ define(function(require){
 		},
 		renderTable : function(){
 			var that = this;
-			var TableRow = Backgrid.Row.extend({
+			/*var TableRow = Backgrid.Row.extend({
 				events: {
 					'click' : 'onClick'
 				},
@@ -151,14 +152,14 @@ define(function(require){
 						}).render().$el).slideDown();
 					}
 				}
-			});
+			});*/
 
 			this.rTableList.show(new XATableLayout({
 				columns: this.getColumns(),
 				collection: this.collection,
 				includeFilter : false,
 				gridOpts : {
-					row: TableRow,
+//					row: TableRow,
 					header : XABackgrid,
 					emptyText : 'No Policies found!'
 				},

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/hive/HivePolicyCreate.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/hive/HivePolicyCreate.js b/security-admin/src/main/webapp/scripts/views/hive/HivePolicyCreate.js
index a7b4fda..50b752c 100644
--- a/security-admin/src/main/webapp/scripts/views/hive/HivePolicyCreate.js
+++ b/security-admin/src/main/webapp/scripts/views/hive/HivePolicyCreate.js
@@ -59,7 +59,8 @@ define(function(require){
     	ui: {
     		'btnSave'	: '[data-id="save"]',
 			'btnCancel' : '[data-id="cancel"]',
-			'btnDelete' : '[data-id="delete"]'
+			'btnDelete' : '[data-id="delete"]',
+			'policyDisabledAlert' : '[data-id="policyDisabledAlert"]'
     	},
 
 		/** ui events hash */
@@ -102,6 +103,7 @@ define(function(require){
 
 		/** on render callback */
 		onRender: function() {
+			XAUtil.showAlerForDisabledPolicy(this);
 			this.rForm.show(this.form);
 			this.initializePlugins();
 			this.rForm.$el.dirtyFields();

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/hive/HiveTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/hive/HiveTableLayout.js b/security-admin/src/main/webapp/scripts/views/hive/HiveTableLayout.js
index 80837e8..0747fe4 100644
--- a/security-admin/src/main/webapp/scripts/views/hive/HiveTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/hive/HiveTableLayout.js
@@ -107,6 +107,7 @@ define(function(require){
 			this.initializePlugins();
 			this.addVisualSearch();
 			this.renderTable();
+			XAUtil.highlightDisabledPolicy(this);
 		},
 
 		/** all post render plugin initialization */
@@ -114,7 +115,7 @@ define(function(require){
 		},
 		renderTable : function(){
 			var that = this;
-			var tableRow = Backgrid.Row.extend({
+			/*var tableRow = Backgrid.Row.extend({
 				events: {
 					'click' : 'onClick'
 				},
@@ -143,13 +144,13 @@ define(function(require){
 					}	
 									
 				}
-			});
+			});*/
 			this.rTableList.show(new XATableLayout({
 				columns: this.getColumns(),
 				collection: this.collection,
 				includeFilter : false,
 				gridOpts : {
-					row: tableRow,
+//					row: tableRow,
 					header : XABackgrid,
 					emptyText : 'No Policies found!'
 				}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/knox/KnoxPolicyCreate.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/knox/KnoxPolicyCreate.js b/security-admin/src/main/webapp/scripts/views/knox/KnoxPolicyCreate.js
index c71a42f..cfb838c 100644
--- a/security-admin/src/main/webapp/scripts/views/knox/KnoxPolicyCreate.js
+++ b/security-admin/src/main/webapp/scripts/views/knox/KnoxPolicyCreate.js
@@ -59,7 +59,8 @@ define(function(require){
     	ui: {
     		'btnSave'	: '[data-id="save"]',
 			'btnCancel' : '[data-id="cancel"]',
-			'btnDelete' : '[data-id="delete"]'
+			'btnDelete' : '[data-id="delete"]',
+			'policyDisabledAlert' : '[data-id="policyDisabledAlert"]'
     	},
 
 		/** ui events hash */
@@ -99,6 +100,7 @@ define(function(require){
 
 		/** on render callback */
 		onRender: function() {
+			XAUtil.showAlerForDisabledPolicy(this);
 			this.rForm.show(this.form);
 			this.initializePlugins();
 			this.rForm.$el.dirtyFields();

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/knox/KnoxTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/knox/KnoxTableLayout.js b/security-admin/src/main/webapp/scripts/views/knox/KnoxTableLayout.js
index 3251791..6564e87 100644
--- a/security-admin/src/main/webapp/scripts/views/knox/KnoxTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/knox/KnoxTableLayout.js
@@ -107,6 +107,7 @@ define(function(require){
 			this.initializePlugins();
 			this.addVisualSearch();
 			this.renderTable();
+			XAUtil.highlightDisabledPolicy(this);
 		},
 
 		/** all post render plugin initialization */
@@ -114,7 +115,7 @@ define(function(require){
 		},
 		renderTable : function(){
 			var that = this;
-			var tableRow = Backgrid.Row.extend({
+			/*var tableRow = Backgrid.Row.extend({
 				events: {
 					'click' : 'onClick'
 				},
@@ -143,13 +144,13 @@ define(function(require){
 					}	
 									
 				}
-			});
+			});*/
 			this.rTableList.show(new XATableLayout({
 				columns: this.getColumns(),
 				collection: this.collection,
 				includeFilter : false,
 				gridOpts : {
-					row: tableRow,
+//					row: tableRow,
 					header : XABackgrid,
 					emptyText : 'No Policies found!'
 				}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/policy/PolicyCreate.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/policy/PolicyCreate.js b/security-admin/src/main/webapp/scripts/views/policy/PolicyCreate.js
index 84a01fc..27b2032 100644
--- a/security-admin/src/main/webapp/scripts/views/policy/PolicyCreate.js
+++ b/security-admin/src/main/webapp/scripts/views/policy/PolicyCreate.js
@@ -64,7 +64,8 @@ define(function(require){
     	ui: {
 			'btnSave'	: '[data-id="save"]',
 			'btnCancel' : '[data-id="cancel"]',
-			'btnDelete' : '[data-id="delete"]'
+			'btnDelete' : '[data-id="delete"]',
+			'policyDisabledAlert' : '[data-id="policyDisabledAlert"]' 
 		},
 
 		/** ui events hash */
@@ -106,6 +107,7 @@ define(function(require){
 
 		/** on render callback */
 		onRender: function() {
+			XAUtil.showAlerForDisabledPolicy(this);
 			this.rForm.show(this.form);
 			this.rForm.$el.dirtyFields();
 			XAUtil.preventNavigation(localization.tt('dialogMsg.preventNavPolicyForm'),this.rForm.$el);

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/storm/StormPolicyCreate.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/storm/StormPolicyCreate.js b/security-admin/src/main/webapp/scripts/views/storm/StormPolicyCreate.js
index 9ea2692..e443a68 100644
--- a/security-admin/src/main/webapp/scripts/views/storm/StormPolicyCreate.js
+++ b/security-admin/src/main/webapp/scripts/views/storm/StormPolicyCreate.js
@@ -59,7 +59,8 @@ define(function(require){
     	ui: {
     		'btnSave'	: '[data-id="save"]',
 			'btnCancel' : '[data-id="cancel"]',
-			'btnDelete' : '[data-id="delete"]'
+			'btnDelete' : '[data-id="delete"]',
+			'policyDisabledAlert' : '[data-id="policyDisabledAlert"]'
     	},
 
 		/** ui events hash */
@@ -99,6 +100,7 @@ define(function(require){
 
 		/** on render callback */
 		onRender: function() {
+			XAUtil.showAlerForDisabledPolicy(this);
 			this.rForm.show(this.form);
 			this.initializePlugins();
 			this.rForm.$el.dirtyFields();

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/storm/StormTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/storm/StormTableLayout.js b/security-admin/src/main/webapp/scripts/views/storm/StormTableLayout.js
index 2f5b1f2..cf8b1e5 100644
--- a/security-admin/src/main/webapp/scripts/views/storm/StormTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/storm/StormTableLayout.js
@@ -107,6 +107,7 @@ define(function(require){
 			this.initializePlugins();
 			this.addVisualSearch();
 			this.renderTable();
+			XAUtil.highlightDisabledPolicy(this);
 		},
 
 		/** all post render plugin initialization */
@@ -114,7 +115,7 @@ define(function(require){
 		},
 		renderTable : function(){
 			var that = this;
-			var tableRow = Backgrid.Row.extend({
+			/*var tableRow = Backgrid.Row.extend({
 				events: {
 					'click' : 'onClick'
 				},
@@ -143,13 +144,13 @@ define(function(require){
 					}	
 									
 				}
-			});
+			});*/
 			this.rTableList.show(new XATableLayout({
 				columns: this.getColumns(),
 				collection: this.collection,
 				includeFilter : false,
 				gridOpts : {
-					row: tableRow,
+//					row: tableRow,
 					header : XABackgrid,
 					emptyText : 'No Policies found!'
 				}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js b/security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js
index 170bb7e..ead5c64 100644
--- a/security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js
@@ -138,7 +138,7 @@ define(function(require){
 		},
 		renderUserListTable : function(){
 			var that = this;
-			var tableRow = Backgrid.Row.extend({
+			/*var tableRow = Backgrid.Row.extend({
 				events: {
 					'click' : 'onClick'
 				},
@@ -178,13 +178,13 @@ define(function(require){
 					  }
 				   });
 				}
-			});
+			});*/
 			this.rTableList.show(new XATableLayout({
 				columns: this.getColumns(),
 				collection: this.collection,
 				includeFilter : false,
 				gridOpts : {
-					row: tableRow,
+//					row: tableRow,
 					header : XABackgrid,
 					emptyText : 'No Users found!'
 				}
@@ -291,7 +291,7 @@ define(function(require){
 		
 		renderGroupListTable : function(){
 			var that = this;
-			var tableRow = Backgrid.Row.extend({
+			/*var tableRow = Backgrid.Row.extend({
 				events: {
 					'click' : 'onClick'
 				},
@@ -333,13 +333,13 @@ define(function(require){
 					   });
 				   });
 				}
-			});
+			});*/
 			this.rTableList.show(new XATableLayout({
 				columns: this.getGroupColumns(),
 				collection: this.groupList,
 				includeFilter : false,
 				gridOpts : {
-					row: tableRow,
+//					row: tableRow,
 					header : XABackgrid,
 					emptyText : 'No Groups found!'
 				}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/styles/xa.css
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/styles/xa.css b/security-admin/src/main/webapp/styles/xa.css
index 16f2c1d..6882315 100644
--- a/security-admin/src/main/webapp/styles/xa.css
+++ b/security-admin/src/main/webapp/styles/xa.css
@@ -636,7 +636,7 @@ table.backgrid thead tr:hover {
 }
 
 .hdfs-table table.backgrid thead th:nth-child(2) {
-  width: 50%;
+  width: 35%;
 }
 
 .m-height {
@@ -1630,4 +1630,14 @@ background-color: #444444;
 }
 .alert {
 	border:none;
+}
+tr.disable-policy td {
+	background-color: #F0F0F0;
+}
+
+.policy-disabled .formHeader,
+.policy-disabled .control-label {
+	color:#aaa;
+}td.html-cell.renderable:last-child {
+	text-align:center;
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hbase/HbasePolicyCreate_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hbase/HbasePolicyCreate_tmpl.html b/security-admin/src/main/webapp/templates/hbase/HbasePolicyCreate_tmpl.html
index e8739c0..601f6cb 100644
--- a/security-admin/src/main/webapp/templates/hbase/HbasePolicyCreate_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hbase/HbasePolicyCreate_tmpl.html
@@ -4,7 +4,10 @@
 	<h4> {{tt 'h.createPolicy'}} </h4>
 {{/if}}	
 <div class="wrap non-collapsible ">
-
+<div class="alert alert-danger" data-id="policyDisabledAlert" style="display:none;">
+  <button type="button" class="close" data-dismiss="alert">&times;</button>
+  <strong>Warning !</strong> {{tt 'msg.policyDisabledMsg'}}
+</div>
 	<div data-id="r_form"></div>
 	<div class="form-actions form-policy" class="row-fluid">
 		{{#if editPolicy}}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hbase/HbasePolicyForm_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hbase/HbasePolicyForm_tmpl.html b/security-admin/src/main/webapp/templates/hbase/HbasePolicyForm_tmpl.html
index 202f046..866f6a2 100644
--- a/security-admin/src/main/webapp/templates/hbase/HbasePolicyForm_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hbase/HbasePolicyForm_tmpl.html
@@ -3,7 +3,9 @@
 		<p class="formHeader">
 			Policy Details : 
 		</p>
-		<div class="" data-fields="policyName"></div>
+		<div class="" data-fields="policyName" style="float:left"></div>
+		<div class="" data-editors="resourceStatus" style="float:left"></div>
+		<div class="clearfix"></div>
 		<div class="" data-fields="tables"></div>
 		<div class="" data-fields="columnFamilies"></div>
 		<div class="" data-fields="columns"></div>
@@ -33,7 +35,6 @@
 			</div>
 		</div>
 		<div class="" data-fields="description"></div>
-		<div class="" data-fields="resourceStatus" style="margin-top: 31px;"></div>
 	</fieldset>
 </form>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hbase/HbaseTableLayout_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hbase/HbaseTableLayout_tmpl.html b/security-admin/src/main/webapp/templates/hbase/HbaseTableLayout_tmpl.html
index 4176e15..eca86d9 100644
--- a/security-admin/src/main/webapp/templates/hbase/HbaseTableLayout_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hbase/HbaseTableLayout_tmpl.html
@@ -1,6 +1,6 @@
 <h3 class="wrap-header bold"> {{tt 'lbl.listOfPolicies'}} : {{assetModel.attributes.name}}
</h3>
 <div class="wrap non-collapsible m-height ">
-	<div class="span9">
+	<div>
 		<div class="span9">
 			<div class="visual_search"></div>
 		</div>
@@ -18,8 +18,8 @@
 		</div>
 	</div>
 
-	<div class="span3" style="margin-top:39px">
+	<!-- <div class="span3" style="margin-top:39px">
 		<div id="policyDetail"></div>
-	</div>
+	</div> -->
 </div>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hdfs/HDFSTableLayout_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hdfs/HDFSTableLayout_tmpl.html b/security-admin/src/main/webapp/templates/hdfs/HDFSTableLayout_tmpl.html
index 6e13971..27bff84 100644
--- a/security-admin/src/main/webapp/templates/hdfs/HDFSTableLayout_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hdfs/HDFSTableLayout_tmpl.html
@@ -1,6 +1,6 @@
 <h3 class="wrap-header bold"> {{tt 'lbl.listOfPolicies'}} : {{assetModel.attributes.name}}
</h3>
 <div class="wrap non-collapsible m-height ">
-	<div class="span9">
+	<div>
 		<div class="span9">
 			<div class="visual_search"></div>
 		</div>
@@ -17,9 +17,9 @@
 		<div data-id="r_hdfstable" class="hdfs-table clickable"></div>
 	</div>
 	
-	<div class="span3" style="margin-top:39px">
+	<!-- <div class="span3" style="margin-top:39px">
 		<div id="folderDetail" style="display:none;"></div>
-		<!-- <div id="folderDetail"></div> --> 
-	</div>
+		<div id="folderDetail"></div> 
+	</div> -->
 </div>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hdfs/PolicyCreate_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hdfs/PolicyCreate_tmpl.html b/security-admin/src/main/webapp/templates/hdfs/PolicyCreate_tmpl.html
index 63bef5b..f77c6b2 100644
--- a/security-admin/src/main/webapp/templates/hdfs/PolicyCreate_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hdfs/PolicyCreate_tmpl.html
@@ -4,6 +4,10 @@
 	<h4> {{tt 'h.createPolicy'}} </h4>
 {{/if}}
 <div class="wrap non-collapsible ">
+<div class="alert alert-danger" data-id="policyDisabledAlert" style="display:none;">
+  <button type="button" class="close" data-dismiss="alert">&times;</button>
+  <strong>Warning !</strong> {{tt 'msg.policyDisabledMsg'}}
+</div>
 	<div data-id="r_form"></div>
 	<div class="form-actions form-policy" class="row-fluid">
 	{{#if editPolicy}}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hdfs/PolicyForm_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hdfs/PolicyForm_tmpl.html b/security-admin/src/main/webapp/templates/hdfs/PolicyForm_tmpl.html
index cc621cd..bcbaeb3 100644
--- a/security-admin/src/main/webapp/templates/hdfs/PolicyForm_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hdfs/PolicyForm_tmpl.html
@@ -10,7 +10,9 @@
 			<input type="text" class="select2-input" id="name2" style="width: 250px;">  
 		</div>
 	</div-->
-	<div class="" data-fields="policyName"></div>
+	<div class="" data-fields="policyName" style="float:left"></div>
+	<div class="" data-editors="resourceStatus" style="float:left"></div>
+	<div class="clearfix"></div>
 	<div class="" data-fields="name"></div>
 	<!-- <div class="" data-fields="description"></div> -->
 	<div class="" data-fields="isRecursive"></div>
@@ -38,7 +40,6 @@
 			</div>
 		</div>
 		<div class="" data-fields="description"></div>
-		<div class="" data-fields="resourceStatus" style="margin-top: 31px;"></div>
 	</fieldset>
 </form>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hive/HivePolicyCreate_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hive/HivePolicyCreate_tmpl.html b/security-admin/src/main/webapp/templates/hive/HivePolicyCreate_tmpl.html
index 69fc201..e7687cf 100644
--- a/security-admin/src/main/webapp/templates/hive/HivePolicyCreate_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hive/HivePolicyCreate_tmpl.html
@@ -4,7 +4,10 @@
 	<h4> {{tt 'h.createPolicy'}} </h4>
 {{/if}}	
 <div class="wrap non-collapsible ">
-
+<div class="alert alert-danger" data-id="policyDisabledAlert" style="display:none;">
+  <button type="button" class="close" data-dismiss="alert">&times;</button>
+  <strong>Warning !</strong> {{tt 'msg.policyDisabledMsg'}}
+</div>
 	<div data-id="r_form"></div>
 	<div class="form-actions form-policy" class="row-fluid">
 		{{#if editPolicy}}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hive/HivePolicyForm_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hive/HivePolicyForm_tmpl.html b/security-admin/src/main/webapp/templates/hive/HivePolicyForm_tmpl.html
index 2ce7b1f..4469d99 100644
--- a/security-admin/src/main/webapp/templates/hive/HivePolicyForm_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hive/HivePolicyForm_tmpl.html
@@ -3,7 +3,9 @@
 		<p class="formHeader">
 			<span>Policy Details :</span> 
 		</p>
-		<div class="" data-fields="policyName"></div>
+		<div class="" data-fields="policyName" style="float:left"></div>
+		<div class="" data-editors="resourceStatus" style="float:left"></div>
+		<div class="clearfix"></div>
 		<div class="" data-fields="databases"></div>
 		<div>
 			<div class="control-group inline-block">
@@ -44,7 +46,6 @@
 			</div>
 		</div>
 		<div class="" data-fields="description"></div>
-		<div class="" data-fields="resourceStatus" style="margin-top: 31px;"></div>
 	</fieldset>
 </form>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/hive/HiveTableLayout_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/hive/HiveTableLayout_tmpl.html b/security-admin/src/main/webapp/templates/hive/HiveTableLayout_tmpl.html
index c53dbb2..b0a9fb9 100644
--- a/security-admin/src/main/webapp/templates/hive/HiveTableLayout_tmpl.html
+++ b/security-admin/src/main/webapp/templates/hive/HiveTableLayout_tmpl.html
@@ -1,6 +1,6 @@
 <h3 class="wrap-header bold"> {{tt 'lbl.listOfPolicies'}} : {{assetModel.attributes.name}}
</h3>
 <div class="wrap non-collapsible m-height ">
-	<div class="span9">
+	<div>
 		<div class="span9">
 			<div class="visual_search"></div>
 		</div>
@@ -18,8 +18,8 @@
 		</div>
 	</div>
 
-	<div class="span3" style="margin-top:39px">
+	<!-- <div class="span3" style="margin-top:39px">
 		<div id="policyDetail"></div>
-	</div>
+	</div> -->
 </div>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/knox/KnoxPolicyCreate_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/knox/KnoxPolicyCreate_tmpl.html b/security-admin/src/main/webapp/templates/knox/KnoxPolicyCreate_tmpl.html
index 69fc201..e7687cf 100644
--- a/security-admin/src/main/webapp/templates/knox/KnoxPolicyCreate_tmpl.html
+++ b/security-admin/src/main/webapp/templates/knox/KnoxPolicyCreate_tmpl.html
@@ -4,7 +4,10 @@
 	<h4> {{tt 'h.createPolicy'}} </h4>
 {{/if}}	
 <div class="wrap non-collapsible ">
-
+<div class="alert alert-danger" data-id="policyDisabledAlert" style="display:none;">
+  <button type="button" class="close" data-dismiss="alert">&times;</button>
+  <strong>Warning !</strong> {{tt 'msg.policyDisabledMsg'}}
+</div>
 	<div data-id="r_form"></div>
 	<div class="form-actions form-policy" class="row-fluid">
 		{{#if editPolicy}}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/knox/KnoxPolicyForm_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/knox/KnoxPolicyForm_tmpl.html b/security-admin/src/main/webapp/templates/knox/KnoxPolicyForm_tmpl.html
index f90e973..6c2f01b 100644
--- a/security-admin/src/main/webapp/templates/knox/KnoxPolicyForm_tmpl.html
+++ b/security-admin/src/main/webapp/templates/knox/KnoxPolicyForm_tmpl.html
@@ -3,7 +3,9 @@
 		<p class="formHeader">
 			<span>Policy Details :</span> 
 		</p>
-		<div class="" data-fields="policyName"></div>
+		<div class="" data-fields="policyName" style="float:left"></div>
+		<div class="" data-editors="resourceStatus" style="float:left"></div>
+		<div class="clearfix"></div>
 		<div class="" data-fields="topologies"></div>
 		<div class="" data-fields="services"></div>
 		
@@ -32,7 +34,6 @@
 			</div>
 		</div>
 		<div class="" data-fields="description"></div>
-		<div class="" data-fields="resourceStatus" style="margin-top: 31px;"></div>
 	</fieldset> 
 </form>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/knox/KnoxTableLayout_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/knox/KnoxTableLayout_tmpl.html b/security-admin/src/main/webapp/templates/knox/KnoxTableLayout_tmpl.html
index f2b1cbf..6331f4f 100644
--- a/security-admin/src/main/webapp/templates/knox/KnoxTableLayout_tmpl.html
+++ b/security-admin/src/main/webapp/templates/knox/KnoxTableLayout_tmpl.html
@@ -1,6 +1,6 @@
 <h3 class="wrap-header bold"> {{tt 'lbl.listOfPolicies'}} : {{assetModel.attributes.name}}
</h3>
 <div class="wrap non-collapsible m-height ">
-	<div class="span9">
+	<div>
 		<div class="span9">
 			<div class="visual_search"></div>
 		</div>
@@ -18,8 +18,8 @@
 		</div>
 	</div>
 
-	<div class="span3" style="margin-top:39px">
+	<!-- <div class="span3" style="margin-top:39px">
 		<div id="policyDetail"></div>
-	</div>
+	</div> -->
 </div>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/storm/StormPolicyCreate_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/storm/StormPolicyCreate_tmpl.html b/security-admin/src/main/webapp/templates/storm/StormPolicyCreate_tmpl.html
index 69fc201..e7687cf 100644
--- a/security-admin/src/main/webapp/templates/storm/StormPolicyCreate_tmpl.html
+++ b/security-admin/src/main/webapp/templates/storm/StormPolicyCreate_tmpl.html
@@ -4,7 +4,10 @@
 	<h4> {{tt 'h.createPolicy'}} </h4>
 {{/if}}	
 <div class="wrap non-collapsible ">
-
+<div class="alert alert-danger" data-id="policyDisabledAlert" style="display:none;">
+  <button type="button" class="close" data-dismiss="alert">&times;</button>
+  <strong>Warning !</strong> {{tt 'msg.policyDisabledMsg'}}
+</div>
 	<div data-id="r_form"></div>
 	<div class="form-actions form-policy" class="row-fluid">
 		{{#if editPolicy}}

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/storm/StormPolicyForm_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/storm/StormPolicyForm_tmpl.html b/security-admin/src/main/webapp/templates/storm/StormPolicyForm_tmpl.html
index 44a8d28..7a0fc65 100644
--- a/security-admin/src/main/webapp/templates/storm/StormPolicyForm_tmpl.html
+++ b/security-admin/src/main/webapp/templates/storm/StormPolicyForm_tmpl.html
@@ -3,7 +3,9 @@
 		<p class="formHeader">
 			<span>Policy Details :</span> 
 		</p>
-		<div class="" data-fields="policyName"></div>
+		<div class="" data-fields="policyName" style="float:left"></div>
+		<div class="" data-editors="resourceStatus" style="float:left"></div>
+		<div class="clearfix"></div>		
 		<div class="" data-fields="topologies"></div>
 		<!-- <div class="" data-fields="services"></div> -->
 		
@@ -32,7 +34,6 @@
 			</div>
 		</div>
 		<div class="" data-fields="description"></div>
-		<div class="" data-fields="resourceStatus" style="margin-top: 31px;"></div>
 	</fieldset> 
 </form>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/storm/StormTableLayout_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/storm/StormTableLayout_tmpl.html b/security-admin/src/main/webapp/templates/storm/StormTableLayout_tmpl.html
index 604c787..c355c11 100644
--- a/security-admin/src/main/webapp/templates/storm/StormTableLayout_tmpl.html
+++ b/security-admin/src/main/webapp/templates/storm/StormTableLayout_tmpl.html
@@ -1,6 +1,6 @@
 <h3 class="wrap-header bold"> {{tt 'lbl.listOfPolicies'}} : {{assetModel.attributes.name}}
</h3>
 <div class="wrap non-collapsible m-height ">
-	<div class="span9">
+	<div>
 		<div class="span9">
 			<div class="visual_search"></div>
 		</div>
@@ -18,8 +18,8 @@
 		</div>
 	</div>
 
-	<div class="span3" style="margin-top:39px">
+	<!-- <div class="span3" style="margin-top:39px">
 		<div id="policyDetail"></div>
-	</div>
+	</div> -->
 </div>
 

http://git-wip-us.apache.org/repos/asf/incubator-argus/blob/5975d281/security-admin/src/main/webapp/templates/users/UserTableLayout_tmpl.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/templates/users/UserTableLayout_tmpl.html b/security-admin/src/main/webapp/templates/users/UserTableLayout_tmpl.html
index c40bc34..9588034 100644
--- a/security-admin/src/main/webapp/templates/users/UserTableLayout_tmpl.html
+++ b/security-admin/src/main/webapp/templates/users/UserTableLayout_tmpl.html
@@ -22,7 +22,7 @@
 
 <div class="wrap non-collapsible m-height ">
 
-	<div class="span9">
+	<div>
 		<div class="span9">
 			<div class="visual_search"></div>
 		</div>
@@ -34,7 +34,7 @@
 		</div>
 	</div>
 
-	<div class="span3">
+	<!-- <div class="span3">
 		<div id="userDetail"></div>
-	</div>
+	</div> -->
 </div>
\ No newline at end of file


Mime
View raw message