You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ranger.apache.org by ni...@apache.org on 2021/04/30 05:43:08 UTC

[ranger] 01/02: RANGER-3247 : [UI-improvement] Ranger admin audit log does not show service/repo name in the policy operation.

This is an automated email from the ASF dual-hosted git repository.

ni3galave pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git

commit b8562443ad881e3cff9aad270c67650b3575f545
Author: Nitin Galave <ni...@apache.org>
AuthorDate: Mon Apr 19 17:07:29 2021 +0530

    RANGER-3247 : [UI-improvement] Ranger admin audit log does not show service/repo name in the policy operation.
---
 security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js    | 3 ++-
 .../src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js | 3 ++-
 .../webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html | 3 ++-
 .../main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html  | 3 ++-
 .../webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html | 3 ++-
 5 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
index 63bb024..2acf35f 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/AuditLayout.js
@@ -909,7 +909,8 @@ define(function(require) {
 								objectId   : self.model.get('objectId'),
 								objectCreatedDate : objectCreatedDate,
 								userName :self.model.get('owner'),
-								action : action
+								action : action,
+								repoName : self.model.get('parentObjectName'),
 							});
 						} else if (self.model.get('objectClassType') == XAEnums.ClassTypes.CLASS_TYPE_RANGER_SECURITY_ZONE.value){
 							var view = new vOperationDiffDetail({
diff --git a/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js b/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
index c319d81..3e0f2f4 100644
--- a/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
+++ b/security-admin/src/main/webapp/scripts/views/reports/PlugableServiceDiffDetail.js
@@ -69,6 +69,7 @@ define(function(require){
 					zoneName: zoneName,
 					newPolicyConditions: this.newConditions,
 					oldPolicyCondition: this.oldConditions,
+					repoName: this.repoName,
 
         		};
         },
@@ -96,7 +97,7 @@ define(function(require){
 		*/
 		initialize: function(options) {
 			console.log("initialized a PlugableServiceDiffDetail ItemView");
-                        _.extend(this, _.pick(options, 'classType','objectName','objectId','objectCreatedDate','action','userName','policyId','policyLabels'));
+                        _.extend(this, _.pick(options, 'classType','objectName','objectId','objectCreatedDate','action','userName','policyId','policyLabels','repoName'));
 			this.bindEvents();
 			this.initializeServiceDef();
 			this.getTemplateForView();
diff --git a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html
index 6b58d9b..3166402 100644
--- a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDeleteDiff_tmpl.html
@@ -15,8 +15,9 @@
   limitations under the License.
 --}}
 <div class="diff-content">
-    <b>Policy ID:</b><label class="badge badge-ranger"> {{objectId}}</div>
+    <div><b>Policy ID:</b><label class="badge badge-ranger"> {{objectId}}</div>
     <div class="no-margin label-size13-weightbold">Policy Name: {{policyName}}</div>
+    <div class="no-margin label-size13-weightbold">Service Name: {{repoName}}</div>
     {{#if zoneName}}
         <div class="no-margin label-size13-weightbold">Zone Name: {{zoneName}}</div>
     {{/if}}
diff --git a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html
index 7fe4665..5a54d62 100644
--- a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyDiff_tmpl.html
@@ -15,8 +15,9 @@
   limitations under the License.
 --}}
 <div class="diff-content">
-    <b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</div>
+    <div><b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</div>
         <div class="no-margin label-size13-weightbold">Policy Name: {{policyName}}</div>
+        <div class="no-margin label-size13-weightbold">Service Name: {{repoName}}</div>
         {{#if zoneName}}
             <div class="no-margin label-size13-weightbold">Zone Name: {{zoneName}}</div>
         {{/if}}
diff --git a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html
index c9901b5..3af680f 100644
--- a/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html
+++ b/security-admin/src/main/webapp/templates/reports/PlugableServicePolicyUpdateDiff_tmpl.html
@@ -17,8 +17,9 @@
 <div class="diff-content">
 	<div class="row">
 		<div class="col-md-6">
-			<b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</label>
+			<div><b>Policy ID :&nbsp;&nbsp;</b><label class="badge badge-ranger"> {{objectId}}</label></div>
 			<label class="no-margin label-size13-weightbold">Policy Name : {{policyName}}</label>
+			<div class="no-margin label-size13-weightbold">Service Name: {{repoName}}</div>
             {{#if zoneName}}
                 <label class="no-margin label-size13-weightbold" > Zone Name  &nbsp;&nbsp;:  {{zoneName}}</label>
             {{/if}}