This is an automated email from the ASF dual-hosted git repository.
ni3galave pushed a commit to branch ranger-2.2
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/ranger-2.2 by this push:
new 7dc0950 RANGER-3362 : UI Improvements.
7dc0950 is described below
commit 7dc0950191203253d8a598283a15b91ab2c4660a
Author: Nitin Galave <[email protected]>
AuthorDate: Wed Aug 4 17:31:58 2021 +0530
RANGER-3362 : UI Improvements.
---
.../src/main/webapp/scripts/views/policies/PermissionList.js | 11 +++++++----
.../src/main/webapp/scripts/views/users/UserTableLayout.js | 7 +++++--
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git
a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
index e4ea25f..28f05ae 100644
--- a/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
+++ b/security-admin/src/main/webapp/scripts/views/policies/PermissionList.js
@@ -174,12 +174,15 @@ define(function(require) {
}
},
dropDownChange : function($select){
- var that = this;
+ var that = this, otherName, otherName2;
$select.on('change',function(e){
- var name = ($(e.currentTarget).attr('data-js')
== that.ui.selectGroups.attr('data-js')) ? 'group' :
+ var name = ($(e.currentTarget).attr('data-js') ==
that.ui.selectGroups.attr('data-js')) ? 'group' :
(($(e.currentTarget).attr('data-js') ==
that.ui.selectUsers.attr('data-js')) ? 'user' : 'role');
- var otherName = (name == 'user') ? 'group':
'user';
- var otherName2 = (name == 'user') ? 'role':
'user';
+ var nameList = ['user', 'group', 'role'];
+ nameList.splice(nameList.indexOf(name),1);
+ otherName = nameList.pop();
+ otherName2 = nameList.pop();
+
that.checkDirtyFieldForDropDown(e);
if(_.isNull(that.model.get(otherName+'Name'))){
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 b8270d9..57d7a96 100755
--- a/security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/users/UserTableLayout.js
@@ -930,6 +930,7 @@ define(function(require){
if(count == numberOfUser){
this.collection.getFirstPage({fetch:true});
this.collection.selected = {};
+ this.$el.find('table
input[type="checkbox"]').prop('checked',false);
XAUtil.blockUI('unblock');
if(notDeletedUserName === "" &&
_.isEmpty(errorMsgForNotDeletedUsers)){
XAUtil.notifySuccess('Success','User deleted
successfully!');
@@ -946,13 +947,14 @@ define(function(require){
if(count == numberOfGroup){
this.groupList.getFirstPage({fetch:true});
this.groupList.selected = {};
+ this.$el.find('table
input[type="checkbox"]').prop('checked',false)
XAUtil.blockUI('unblock');
if(notDeletedGroupName === "" &&
_.isEmpty(errorMsgForNotDeletedGroups)){
XAUtil.notifySuccess('Success','Group deleted
successfully!');
} else {
var msg = "";
if(!_.isEmpty(notDeletedGroupName)){
- msg = 'Error occurred during deleting Users:
'+ notDeletedGroupName.slice(0 , -2);
+ msg = 'Error occurred during deleting Groups:
'+ notDeletedGroupName.slice(0 , -2);
}
XAUtil.notifyError('Error',
errorMsgForNotDeletedGroups + msg);
}
@@ -962,13 +964,14 @@ define(function(require){
if(count == numberOfRole){
this.roleList.getFirstPage({fetch:true});
this.roleList.selected = {};
+ this.$el.find('table
input[type="checkbox"]').prop('checked',false)
XAUtil.blockUI('unblock');
if(notDeletedRoleName === "" &&
_.isEmpty(errorMsgForNotDeletedRoles)){
XAUtil.notifySuccess('Success','Role deleted
successfully!');
} else {
var msg = "";
if(!_.isEmpty(notDeletedRoleName)){
- msg = 'Error occurred during deleting Users:
'+ notDeletedRoleName.slice(0 , -2);
+ msg = 'Error occurred during deleting Roles:
'+ notDeletedRoleName.slice(0 , -2);
}
XAUtil.notifyError('Error',
errorMsgForNotDeletedRoles + msg);
}