Ensure that the lock panel should not be blocked for larger records. Fixes #6570

This commit is contained in:
Nikhil Mohite 2021-08-25 11:05:28 +05:30 committed by Akshay Joshi
parent e39838455e
commit 737bc6a965
3 changed files with 24 additions and 2 deletions

View File

@ -25,6 +25,7 @@ Bug fixes
| `Issue #6531 <https://redmine.postgresql.org/issues/6531>`_ - Fixed the export image issue where relation lines are over the nodes.
| `Issue #6544 <https://redmine.postgresql.org/issues/6544>`_ - Fixed width limitation issue in PSQL tool window.
| `Issue #6564 <https://redmine.postgresql.org/issues/6564>`_ - Fixed an issue where columns with sequences get altered unnecessarily with a schema diff tool.
| `Issue #6570 <https://redmine.postgresql.org/issues/6570>`_ - Ensure that the lock panel should not be blocked for larger records.
| `Issue #6572 <https://redmine.postgresql.org/issues/6572>`_ - Partially fixes the data output panel display issue.
| `Issue #6641 <https://redmine.postgresql.org/issues/6641>`_ - Enables pgAdmin to retrieve user permissions in case of nested roles which helps to terminate the session for AWS RDS.
| `Issue #6663 <https://redmine.postgresql.org/issues/6663>`_ - Fixed no attribute '_asdict' error when connecting the database server.

View File

@ -480,9 +480,17 @@ define('pgadmin.dashboard', [
$(container).data('grid', grid);
$(container).data('filter', filter);
},
__loadMoreRows: function(e) {
let elem = e.currentTarget;
if ((elem.scrollHeight - 10) < elem.scrollTop + elem.offsetHeight) {
if (this.data.length > 0) {
this.local_grid.collection.add(this.data.splice(0, 50));
}
}
},
// Render the data in a grid
render_grid_data: function(container) {
var that = this;
var data = $(container).data('data'),
grid = $(container).data('grid'),
filter = $(container).data('filter');
@ -493,7 +501,11 @@ define('pgadmin.dashboard', [
data.fetch({
reset: true,
success: function() {
success: function(res) {
that.data = res.models;
that.local_grid = grid;
grid.collection.reset(that.data.splice(0,50));
// If we're showing an error, remove it, and replace the grid & filter
if ($(container).hasClass('grid-error')) {
$(container).removeClass('grid-error');
@ -501,6 +513,14 @@ define('pgadmin.dashboard', [
$(filter.el).show();
}
if(that.data.length > 50) {
// Listen scroll event to load more rows
$('.pg-panel-content').on('scroll', that.__loadMoreRows.bind(that));
} else {
// Listen scroll event to load more rows
$('.pg-panel-content').off('scroll', that.__loadMoreRows);
}
// Re-apply search criteria
filter.search();
},

View File

@ -166,6 +166,7 @@
right:0px;
bottom:0px;
height: 100%!important;
overflow: scroll;
}
.pg-prop-footer {