Repository: incubator-ranger
Updated Branches:
  refs/heads/master 4b7a1a767 -> ce5f434f5


RANGER-1086 : Under Audit>Admin tab pop up for service create and update does 
not work

Signed-off-by: Velmurugan Periasamy <[email protected]>


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

Branch: refs/heads/master
Commit: ce5f434f50cf67c712c828fe3d6dd198a50a9051
Parents: 4b7a1a7
Author: Mehul Parikh <[email protected]>
Authored: Fri Jul 8 14:58:15 2016 +0530
Committer: Velmurugan Periasamy <[email protected]>
Committed: Fri Jul 8 19:33:27 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/ranger/biz/AssetMgr.java    |  2 +-
 security-admin/src/main/webapp/index.html       |  1 -
 .../views/reports/OperationDiffDetail.js        |  9 ++++---
 .../reports/GroupOperationDiff_tmpl.html        | 27 +++++++++++++++++++-
 .../reports/UserOperationDiff_tmpl.html         | 27 +++++++++++++++++++-
 5 files changed, 59 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ce5f434f/security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java
----------------------------------------------------------------------
diff --git a/security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java 
b/security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java
index 4bc57fb..5ecae8d 100644
--- a/security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java
+++ b/security-admin/src/main/java/org/apache/ranger/biz/AssetMgr.java
@@ -793,7 +793,7 @@ public class AssetMgr extends AssetMgrBase {
                                        String 
tempNewArr[]=vXTrxLog.getNewValue().split(",");
                                        for(int i=0;i<tempNewArr.length;i++){
                                                
if(tempNewArr[i].contains("{\"password")){
-                                                       
vXTrxLog.setNewValue(tempNewStr.replace(tempNewArr[i], 
"{\"password\":\"*****\"}"));
+                                                       
vXTrxLog.setNewValue(tempNewStr.replace(tempNewArr[i], 
"{\"password\":\"*****\""));
                                                        break;
                                                }else 
if(tempNewArr[i].contains("\"password") && tempNewArr[i].contains("}")){
                                                        
vXTrxLog.setNewValue(tempNewStr.replace(tempNewArr[i], 
"\"password\":\"******\"}"));

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ce5f434f/security-admin/src/main/webapp/index.html
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/index.html 
b/security-admin/src/main/webapp/index.html
index 31833b6..d8a5d98 100644
--- a/security-admin/src/main/webapp/index.html
+++ b/security-admin/src/main/webapp/index.html
@@ -42,7 +42,6 @@
                <link href="libs/other/datepicker/css/datepicker.css" 
media="all" rel="stylesheet" type="text/css">
                <link href="libs/bower/x-editable/css/bootstrap-editable.css" 
media="all" rel="stylesheet" type="text/css">
                <link 
href="libs/other/jquery-ui/css/jquery-ui-1.10.3.custom.min.css" 
rel="stylesheet">
-               <link href="libs/other/visualsearch/css/reset.css" 
rel="stylesheet">
                <link href="libs/other/visualsearch/css/workspace.css" 
rel="stylesheet">
                <link href="libs/other/visualsearch/css/icons.css" 
rel="stylesheet">   
                <link href="styles/xa.css" media="all" rel="stylesheet" 
type="text/css" >

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ce5f434f/security-admin/src/main/webapp/scripts/views/reports/OperationDiffDetail.js
----------------------------------------------------------------------
diff --git 
a/security-admin/src/main/webapp/scripts/views/reports/OperationDiffDetail.js 
b/security-admin/src/main/webapp/scripts/views/reports/OperationDiffDetail.js
index 07879ea..c8fc050 100644
--- 
a/security-admin/src/main/webapp/scripts/views/reports/OperationDiffDetail.js
+++ 
b/security-admin/src/main/webapp/scripts/views/reports/OperationDiffDetail.js
@@ -193,11 +193,11 @@ define(function(require){
                                        configModel = m;
                                }else if(m.get('attributeName') == "Service 
Status"){
                                         var newVal = m.get('newValue'), oldVal 
= m.get('previousValue');            
-                                        if(!_.isUndefined(newVal)){
+                                        if(!_.isUndefined(newVal) && 
!_.isEmpty(newVal)){
                                                 m.set('newValue', 
$.parseJSON(newVal) ? XAEnums.ActiveStatus.STATUS_ENABLED.label 
                                                                 : 
XAEnums.ActiveStatus.STATUS_DISABLED.label);
                                         }
-                                        if(!_.isUndefined(oldVal)){
+                                        if(!_.isUndefined(oldVal) && 
!_.isEmpty(oldVal)){
                                                 m.set('previousValue', 
$.parseJSON(oldVal) ? XAEnums.ActiveStatus.STATUS_ENABLED.label 
                                                                 : 
XAEnums.ActiveStatus.STATUS_DISABLED.label);
                                         }
@@ -359,7 +359,10 @@ define(function(require){
                                                
that.previousGroupList.push(m.get('parentObjectName'));
                                        modelArr.push(m);
                                } else if(m.get('attributeName') == 'User 
Role'){
-                                       var newRole =  
m.get('newValue').replace(/[[\]]/g,'');
+                                       var newRole;
+                                       if(!_.isUndefined(m.get('newValue'))){
+                                               newRole =  
m.get('newValue').replace(/[[\]]/g,'');
+                                       }
                                        var prevRole = 
m.get('previousValue').replace(/[[\]]/g,'');
                                        if( newRole == "ROLE_USER")
                                                
m.set('newValue',XAEnums.UserRoles.ROLE_USER.label)

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ce5f434f/security-admin/src/main/webapp/templates/reports/GroupOperationDiff_tmpl.html
----------------------------------------------------------------------
diff --git 
a/security-admin/src/main/webapp/templates/reports/GroupOperationDiff_tmpl.html 
b/security-admin/src/main/webapp/templates/reports/GroupOperationDiff_tmpl.html
index e823bb6..1677be2 100644
--- 
a/security-admin/src/main/webapp/templates/reports/GroupOperationDiff_tmpl.html
+++ 
b/security-admin/src/main/webapp/templates/reports/GroupOperationDiff_tmpl.html
@@ -49,6 +49,31 @@
                </div>
        {{/if}} 
 {{else}}
-       <h4>{{tt 'msg.groupDoesNotExistAnymore'}}</h4>
+       <label class="no-margin label-size13-weightbold" > Deleted By  
&nbsp;&nbsp;:  {{userName}}</label>
+       {{#if collection.length}}
+       <h5>Group Details:</h5>
+               <div class="diff">
+                       <div class="diff-left">
+                               <h3>Fields</h3>
+                                       <ol class="attr">
+                                       {{#each collection}}
+                                               <li 
class="change-row">{{./this.attributes.attributeName}}</li>
+                                       {{/each}}
+                                       </ol>
+                       </div>
+                       <div class="diff-right">
+                               <h3>Old Value</h3>
+                                       <ol class="unstyled data">
+                                       {{#each collection}}
+                                           {{#if 
./this.attributes.previousValue}}
+                                                       <li 
class="change-row">{{./this.attributes.previousValue}}</li>
+                                               {{else}}
+                                                       <li 
class="change-row">--</li>
+                                               {{/if}}
+                                       {{/each}}
+                                       </ol>
+                       </div>
+               </div>
+       {{/if}}
 {{/compare}}
 </div>

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/ce5f434f/security-admin/src/main/webapp/templates/reports/UserOperationDiff_tmpl.html
----------------------------------------------------------------------
diff --git 
a/security-admin/src/main/webapp/templates/reports/UserOperationDiff_tmpl.html 
b/security-admin/src/main/webapp/templates/reports/UserOperationDiff_tmpl.html
index c8ce957..669869d 100644
--- 
a/security-admin/src/main/webapp/templates/reports/UserOperationDiff_tmpl.html
+++ 
b/security-admin/src/main/webapp/templates/reports/UserOperationDiff_tmpl.html
@@ -72,6 +72,31 @@
        {{/if}}
 
 {{else}}
-       <h4>{{tt 'msg.userDoesNotExistAnymore'}}</h4>
+       <label class="no-margin label-size13-weightbold" > Deleted By  
&nbsp;&nbsp;:  {{userName}}</label>
+       {{#if collection.length}}
+       <h5>User Details:</h5>
+               <div class="diff">
+                       <div class="diff-left">
+                               <h3>Fields</h3>
+                                       <ol class="attr">
+                                       {{#each collection}}
+                                               <li 
class="change-row">{{./this.attributes.attributeName}}</li>
+                                       {{/each}}
+                                       </ol>
+                       </div>
+                       <div class="diff-right">
+                               <h3>Old Value</h3>
+                                       <ol class="unstyled data">
+                                       {{#each collection}}
+                                               {{#if 
./this.attributes.previousValue}}
+                                                       <li 
class="change-row">{{./this.attributes.previousValue}}</li>
+                                               {{else}}
+                                                       <li 
class="change-row">--</li>
+                                               {{/if}}
+                                       {{/each}}
+                                       </ol>
+                       </div>
+               </div>
+       {{/if}}
 {{/compare}}
 </div>

Reply via email to