agusmakmun / django-log-viewer

Django Log Viewer allows you to read & download log files in the admin page
https://pypi.org/project/django-log-viewer/
MIT License
74 stars 30 forks source link

The log entries loaded all #1

Closed agusmakmun closed 4 years ago

agusmakmun commented 5 years ago

This problem was found when "Log files" was clicked, and go to another page, \ and log entries loaded all. But after the dropdown "Show entries (page length)" the pagination working fine.

ks-manish commented 4 years ago

In function fnDisplayEnd in jquery.dataTables.min.js fnDisplayEnd: function () { **_var a = this._iDisplayLength_**, b = this._iDisplayStart, c = b + a, d = this.aiDisplay.length, e = this.oFeatures, f = e.bPaginate; return e.bServerSide ? !1 === f || -1 === a ? b + d : Math.min(b + a, this._iRecordsDisplay) : !f || c > d || -1 === a ? d : c }

var a is being initialized as string somehow...which is causing issue. On changing page length from dropdown this var is getting initialized as number. on parsing it to Int as var a = parseInt(this._iDisplayLength) ,it works fine.