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

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


The following commit(s) were added to refs/heads/master by this push:
     new 8045c78  ATLAS-4092 Remove unused attributes and add right attributes 
to the atlas admin audit api
8045c78 is described below

commit 8045c7841216974cafa8b04aa14fbd5aa893ba55
Author: Mandar Ambawane <[email protected]>
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 <[email protected]>
---
 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);

Reply via email to