This is an automated email from the ASF dual-hosted git repository. nixon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/atlas.git
commit a098068614bac0902eb8ccc8ce297f3ac1f580c1 Author: prasad pawar <prasad.pa...@freestoneinfotech.com> AuthorDate: Wed May 26 12:25:21 2021 +0530 ATLAS-4308:ATLAS UI Audit sorting : When consecutive Entity Audits are fired, sorting happens on the previous sorted results received from the server, fixed Signed-off-by: nixonrodrigues <ni...@apache.org> --- dashboardv2/public/js/views/audit/AuditTableLayoutView.js | 9 +-------- dashboardv3/public/js/views/audit/AuditTableLayoutView.js | 8 +------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js index d5e453c..625ae87 100644 --- a/dashboardv2/public/js/views/audit/AuditTableLayoutView.js +++ b/dashboardv2/public/js/views/audit/AuditTableLayoutView.js @@ -93,9 +93,6 @@ define(['require', fetchAuditCollection: function() { this.commonTableOptions['atlasPaginationOpts'] = this.getPaginationOptions(); this.fetchCollection(); - this.entityCollection.comparator = function(model) { - return -model.get('timestamp'); - } }, bindEvents: function() {}, getPaginationOptions: function() { @@ -118,9 +115,7 @@ define(['require', this.entityCollection.fetch({ success: function(dataOrCollection, response) { that.entityCollection.state.pageSize = that.getPageCount(); - if (!that.fromSort) { - that.entityCollection.fullCollection.reset(response, $.extend(options)); - } + that.entityCollection.reset(response, $.extend(options)); }, complete: function() { that.$('.fontLoader').hide(); @@ -128,7 +123,6 @@ define(['require', that.$('.auditTable').show(); if (that.fromSort) { that.fromSort = !that.fromSort; - that.renderTableLayoutView(); } }, silent: true @@ -187,7 +181,6 @@ define(['require', 'views/audit/CreateAuditTableLayoutView', ], function(CreateAuditTableLayoutView) { that.action = model.get('action'); - // $(el.target).attr('disabled', true); var eventModel = that.entityCollection.fullCollection.findWhere({ 'eventKey': model.get('eventKey') }).toJSON(), collectionModel = new that.entityCollection.model(eventModel), view = new CreateAuditTableLayoutView({ guid: that.guid, entityModel: collectionModel, action: that.action, entity: that.entity, entityName: that.entityName, attributeDefs: that.attributeDefs }); diff --git a/dashboardv3/public/js/views/audit/AuditTableLayoutView.js b/dashboardv3/public/js/views/audit/AuditTableLayoutView.js index 49b84dd..625ae87 100644 --- a/dashboardv3/public/js/views/audit/AuditTableLayoutView.js +++ b/dashboardv3/public/js/views/audit/AuditTableLayoutView.js @@ -93,9 +93,6 @@ define(['require', fetchAuditCollection: function() { this.commonTableOptions['atlasPaginationOpts'] = this.getPaginationOptions(); this.fetchCollection(); - this.entityCollection.comparator = function(model) { - return -model.get('timestamp'); - } }, bindEvents: function() {}, getPaginationOptions: function() { @@ -118,9 +115,7 @@ define(['require', this.entityCollection.fetch({ success: function(dataOrCollection, response) { that.entityCollection.state.pageSize = that.getPageCount(); - if (!that.fromSort) { - that.entityCollection.fullCollection.reset(response, $.extend(options)); - } + that.entityCollection.reset(response, $.extend(options)); }, complete: function() { that.$('.fontLoader').hide(); @@ -128,7 +123,6 @@ define(['require', that.$('.auditTable').show(); if (that.fromSort) { that.fromSort = !that.fromSort; - that.renderTableLayoutView(); } }, silent: true