You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by kb...@apache.org on 2020/03/16 14:27:45 UTC

[atlas] branch branch-2.0 updated: ATLAS-3657 : UI: changes for entity purge audits (Minor title changes)

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

kbhatt pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 01452a4  ATLAS-3657 : UI: changes for entity purge audits (Minor title changes)
01452a4 is described below

commit 01452a435ba3853f51f3e7e03f83f5601aefbae9
Author: kevalbhatt <kb...@apache.org>
AuthorDate: Mon Mar 16 19:53:25 2020 +0530

    ATLAS-3657 : UI: changes for entity purge audits (Minor title changes)
    
    (cherry picked from commit 60f878e599a37a4befaa21b89fa8982a8d1ace90)
---
 .../AdministratorLayoutView_tmpl.html              |  4 ++--
 .../js/views/audit/AdminAuditTableLayoutView.js    | 24 ++++++----------------
 2 files changed, 8 insertions(+), 20 deletions(-)

diff --git a/dashboardv3/public/js/templates/administrator/AdministratorLayoutView_tmpl.html b/dashboardv3/public/js/templates/administrator/AdministratorLayoutView_tmpl.html
index f734c94..70f96e1 100644
--- a/dashboardv3/public/js/templates/administrator/AdministratorLayoutView_tmpl.html
+++ b/dashboardv3/public/js/templates/administrator/AdministratorLayoutView_tmpl.html
@@ -22,7 +22,7 @@
         <ul class="nav nav-tabs" data-id="tab-list">
             <li role="businessMetadata" class="tab active"><a href="#tab-businessMetadata" aria-controls="tab-businessMetadata" role="tab" data-toggle="tab">Business Metadata</a></li>
             <li role="enum"><a href="#tab-enum" aria-controls="tab-enum" role="tab" data-toggle="tab">Enumerations</a></li>
-            <li role="admin"><a href="#tab-admin" aria-controls="tab-admin" role="tab" data-toggle="tab">Audits</a></li>
+            <li role="audit"><a href="#tab-audit" aria-controls="tab-audit" role="tab" data-toggle="tab">Audits</a></li>
         </ul>
     </div>
 </div>
@@ -36,7 +36,7 @@
             <div id="r_enumTableLayoutView">
             </div>
         </div>
-        <div id="tab-admin" role="admin" class="tab-pane animated fadeIn">
+        <div id="tab-audit" role="audit" class="tab-pane animated fadeIn">
             <div id="r_adminTableLayoutView">
             </div>
         </div>
diff --git a/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js b/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
index 6b4cfb7..456ceda 100644
--- a/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
+++ b/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
@@ -79,7 +79,6 @@ define(['require',
                 this.limit = 25;
                 this.entityCollection.url = UrlLinks.adminApiUrl();
                 this.entityCollection.modelAttrName = "events";
-                this.onlyAdmin = true;
                 this.commonTableOptions = {
                     collection: this.entityCollection,
                     includeFilter: false,
@@ -152,7 +151,7 @@ define(['require',
                 }]
             },
             onRender: function() {
-                var str = '<option>All</option><option>Admin</option>';
+                var str = '<option>All</option><option>Purged</option>';
                 this.ui.adminType.html(str);
                 this.ui.adminType.select2({});
                 this.ui.adminRegion.hide();
@@ -174,7 +173,7 @@ define(['require',
                     "operator": "like",
                     "attributeValue": "admin"
                 }];
-                if (!this.onlyAdmin) {
+                if (this.onlyPurged === true) {
                     adminAttributes.push({
                         "attributeName": "operation",
                         "operator": "like",
@@ -281,7 +280,7 @@ define(['require',
                             } else {
                                 adminValues = '';
                             }
-                            var adminText = '<div class="row"><div class="col-sm-12 attr-details admin-attr-details"><div class="col-sm-2">Admin Entities: </div><div class="col-sm-10">' + adminValues + '</div></div></div>';
+                            var adminText = '<div class="row"><div class="col-sm-12 attr-details admin-attr-details"><div class="col-sm-2">Purged Entities: </div><div class="col-sm-10">' + adminValues + '</div></div></div>';
                             $(el).append($('<div>').html(adminText));
 
                         }
@@ -294,18 +293,7 @@ define(['require',
                     operation: {
                         label: "Operation",
                         cell: "String",
-                        editable: false,
-                        formatter: _.extend({}, Backgrid.CellFormatter.prototype, {
-                            fromRaw: function(rawValue, model) {
-                                if (rawValue === "PURGE" && model.attributes.params) {
-                                    var adminLength = model.attributes.result.replace('[', '').replace(']', '').split(',').length;
-                                    return adminLength === 1 ? adminLength + " entity purged." : adminLength + " entities purged.";
-                                } else {
-                                    return "No entity purged.";
-                                }
-
-                            }
-                        })
+                        editable: false
                     },
                     clientId: {
                         label: "Client ID",
@@ -336,7 +324,7 @@ define(['require',
 
             },
             onClickAdminType: function(e, value) {
-                this.onlyAdmin = e.currentTarget.value === "Admin" ? false : true;
+                this.onlyPurged = e.currentTarget.value === "Purged";
                 this.getAdminCollection();
             },
             onClickAdminEntity: function(e) {
@@ -348,7 +336,7 @@ define(['require',
                             guid: $(e.target).text(),
                         },
                         modal = new Modal({
-                            title: "Admin Entity Details : " + obj.guid,
+                            title: "Purged Entity Details: " + obj.guid,
                             content: new AuditTableLayoutView(obj),
                             mainClass: "modal-full-screen",
                             okCloses: true,