ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject incubator-ranger git commit: RANGER-200 : Fix pagination issue when a policy is deleted
Date Fri, 17 Apr 2015 02:45:27 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 9d2cbfb41 -> 6f888a61f


RANGER-200 : Fix pagination issue when a policy is deleted

Signed-off-by: Velmurugan Periasamy <vel@apache.org>


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

Branch: refs/heads/master
Commit: 6f888a61f2b3a39fb46b04a37b5940d5403a88a1
Parents: 9d2cbfb
Author: Gautam Borad <gborad@gmail.com>
Authored: Thu Apr 16 18:39:56 2015 +0530
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Thu Apr 16 22:45:03 2015 -0400

----------------------------------------------------------------------
 .../org/apache/ranger/service/RangerPolicyServiceBase.java     | 3 ++-
 .../org/apache/ranger/service/RangerServiceServiceBase.java    | 3 ++-
 security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js  | 1 +
 .../webapp/scripts/views/policies/RangerPolicyTableLayout.js   | 6 ++----
 4 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6f888a61/security-admin/src/main/java/org/apache/ranger/service/RangerPolicyServiceBase.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/service/RangerPolicyServiceBase.java
b/security-admin/src/main/java/org/apache/ranger/service/RangerPolicyServiceBase.java
index 34bc77a..319ca29 100644
--- a/security-admin/src/main/java/org/apache/ranger/service/RangerPolicyServiceBase.java
+++ b/security-admin/src/main/java/org/apache/ranger/service/RangerPolicyServiceBase.java
@@ -29,6 +29,7 @@ import org.apache.ranger.common.SearchField;
 import org.apache.ranger.common.SortField;
 import org.apache.ranger.common.SearchField.DATA_TYPE;
 import org.apache.ranger.common.SearchField.SEARCH_TYPE;
+import org.apache.ranger.common.SortField.SORT_ORDER;
 import org.apache.ranger.db.XXAccessTypeDefDao;
 import org.apache.ranger.db.XXPolicyResourceDao;
 import org.apache.ranger.entity.XXAccessTypeDef;
@@ -81,7 +82,7 @@ public abstract class RangerPolicyServiceBase<T extends XXPolicyBase,
V extends
 
 		sortFields.add(new SortField(SearchFilter.CREATE_TIME, "obj.createTime"));
 		sortFields.add(new SortField(SearchFilter.UPDATE_TIME, "obj.updateTime"));
-		sortFields.add(new SortField(SearchFilter.POLICY_ID, "obj.id"));
+		sortFields.add(new SortField(SearchFilter.POLICY_ID, "obj.id", true, SORT_ORDER.ASC));
 		sortFields.add(new SortField(SearchFilter.POLICY_NAME, "obj.name"));
 	}
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6f888a61/security-admin/src/main/java/org/apache/ranger/service/RangerServiceServiceBase.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/service/RangerServiceServiceBase.java
b/security-admin/src/main/java/org/apache/ranger/service/RangerServiceServiceBase.java
index 22d8fc9..5505a88 100644
--- a/security-admin/src/main/java/org/apache/ranger/service/RangerServiceServiceBase.java
+++ b/security-admin/src/main/java/org/apache/ranger/service/RangerServiceServiceBase.java
@@ -27,6 +27,7 @@ import org.apache.ranger.common.SearchField;
 import org.apache.ranger.common.SortField;
 import org.apache.ranger.common.SearchField.DATA_TYPE;
 import org.apache.ranger.common.SearchField.SEARCH_TYPE;
+import org.apache.ranger.common.SortField.SORT_ORDER;
 import org.apache.ranger.entity.XXService;
 import org.apache.ranger.entity.XXServiceBase;
 import org.apache.ranger.entity.XXServiceDef;
@@ -48,7 +49,7 @@ public abstract class RangerServiceServiceBase<T extends XXServiceBase,
V extend
 		
 		sortFields.add(new SortField(SearchFilter.CREATE_TIME, "obj.createTime"));
 		sortFields.add(new SortField(SearchFilter.UPDATE_TIME, "obj.updateTime"));
-		sortFields.add(new SortField(SearchFilter.SERVICE_ID, "obj.id"));
+		sortFields.add(new SortField(SearchFilter.SERVICE_ID, "obj.id", true, SORT_ORDER.ASC));
 		sortFields.add(new SortField(SearchFilter.SERVICE_NAME, "obj.name"));
 		
 	}

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6f888a61/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js b/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
index 0ffd272..3d33d86 100644
--- a/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
+++ b/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
@@ -37,6 +37,7 @@ function doLogin() {
 		$('#errorBox').show();
 		$('#signInLoading').hide();
 		$('#signIn').removeAttr('disabled');
+		$('#errorBox .errorMsg').text("The username or password you entered is incorrect..");
 		return false;
 	}
 	var userName = $('#username').val().trim();

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/6f888a61/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
index 98a253d..0e92d6e 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/RangerPolicyTableLayout.js
@@ -272,10 +272,8 @@ define(function(require){
 							XAUtil.blockUI('unblock');
 							that.collection.remove(model.get('id'));
 							XAUtil.notifySuccess('Success', localization.tt('msg.policyDeleteMsg'));
-							if(that.collection.length ==  0){
-								that.renderTable();
-								that.collection.fetch();
-							}
+							that.renderTable();
+							that.collection.fetch();
 						},
 						error: function (model, response, options) {
 							XAUtil.blockUI('unblock');


Mime
View raw message