You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by nb...@apache.org on 2021/01/13 06:52:47 UTC

[atlas] branch branch-2.0 updated: ATLAS-4092 Remove unused attributes and add right attributes to the atlas admin audit api

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

nbonte 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 9a40745  ATLAS-4092 Remove unused attributes and add right attributes to the atlas admin audit api
9a40745 is described below

commit 9a407456019b54957ac5e3269a104bebcf18c0c0
Author: Mandar Ambawane <ma...@freestoneinfotech.com>
AuthorDate: Wed Jan 6 18:39:04 2021 +0530

    ATLAS-4092 Remove unused attributes and add right attributes to the atlas admin audit api
    
    Signed-off-by: Nikhil Bonte <nb...@apache.org>
    (cherry picked from commit 8045c7841216974cafa8b04aa14fbd5aa893ba55)
---
 dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js | 6 +++---
 dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js b/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
index dcfd82a..0f27c4e 100644
--- a/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
+++ b/dashboardv2/public/js/views/audit/AdminAuditTableLayoutView.js
@@ -167,10 +167,10 @@ define(['require',
             getAdminCollection: function(option) {
                 var that = this,
                     auditFilters = CommonViewFunction.attributeFilter.generateAPIObj(that.ruleUrl);
-                $.extend(that.entityCollection.queryParams, { auditFilters: that.isFilters ? auditFilters : null });
+                $.extend(that.entityCollection.queryParams, { auditFilters: that.isFilters ? auditFilters : null, limit: that.entityCollection.queryParams.limit || that.limit, offset: that.entityCollection.queryParams.offset || that.offset, sortBy: "startTime", sortOrder: "DESCENDING" });
                 var apiObj = {
                     sort: false,
-                    data: that.entityCollection.queryParams,
+                    data: _.pick(that.entityCollection.queryParams, 'auditFilters', 'limit', 'offset', 'sortBy', 'sortOrder'),
                     success: function(dataOrCollection, response) {
                         that.entityCollection.state.pageSize = that.entityCollection.queryParams.limit || 25;
                         that.entityCollection.fullCollection.reset(dataOrCollection, option);
@@ -371,7 +371,7 @@ define(['require',
                 var adminValues = "",
                     adminTypDetails = (obj.operation === 'IMPORT') ? Enums.category[obj.operation] : Enums.category[obj.operation] + " And Options",
                     resultData = obj.results ? JSON.parse(obj.results) : null,
-                    paramsData = (obj.model && obj.model.get('params')) ? { params: [obj.model.get('params')] } : null;
+                    paramsData = (obj.model && obj.model.get('params') && obj.model.get('params').length) ? { params: [obj.model.get('params')] } : null;
 
                 if (resultData) {
                     adminValues += this.showImportExportTable(resultData, obj.operation);
diff --git a/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js b/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
index dcfd82a..0f27c4e 100644
--- a/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
+++ b/dashboardv3/public/js/views/audit/AdminAuditTableLayoutView.js
@@ -167,10 +167,10 @@ define(['require',
             getAdminCollection: function(option) {
                 var that = this,
                     auditFilters = CommonViewFunction.attributeFilter.generateAPIObj(that.ruleUrl);
-                $.extend(that.entityCollection.queryParams, { auditFilters: that.isFilters ? auditFilters : null });
+                $.extend(that.entityCollection.queryParams, { auditFilters: that.isFilters ? auditFilters : null, limit: that.entityCollection.queryParams.limit || that.limit, offset: that.entityCollection.queryParams.offset || that.offset, sortBy: "startTime", sortOrder: "DESCENDING" });
                 var apiObj = {
                     sort: false,
-                    data: that.entityCollection.queryParams,
+                    data: _.pick(that.entityCollection.queryParams, 'auditFilters', 'limit', 'offset', 'sortBy', 'sortOrder'),
                     success: function(dataOrCollection, response) {
                         that.entityCollection.state.pageSize = that.entityCollection.queryParams.limit || 25;
                         that.entityCollection.fullCollection.reset(dataOrCollection, option);
@@ -371,7 +371,7 @@ define(['require',
                 var adminValues = "",
                     adminTypDetails = (obj.operation === 'IMPORT') ? Enums.category[obj.operation] : Enums.category[obj.operation] + " And Options",
                     resultData = obj.results ? JSON.parse(obj.results) : null,
-                    paramsData = (obj.model && obj.model.get('params')) ? { params: [obj.model.get('params')] } : null;
+                    paramsData = (obj.model && obj.model.get('params') && obj.model.get('params').length) ? { params: [obj.model.get('params')] } : null;
 
                 if (resultData) {
                     adminValues += this.showImportExportTable(resultData, obj.operation);