Skip to content

Commit 215a43d

Browse files
committed
Merge pull request apache#751 from shapeblue/master-CLOUDSTACK-8766
CLOUDSTACK-8766: Fix infinite scrolling pagination for zonal iso/template listing Due to aggregation of templates and isos on the UI/client side, it could result that for each page we could end up having lesser templates/isos listed to have the scroll shown that triggers infinite scrolling. The fix is to use similar approach as in projects.js, to use the maximum pagesize of 500. In theory, there is still a chance if there are 500 zones with the same template being listed resulting in only one aggregated template which could cause the scroll to not get shown; but in practice I believe this fix should work for most users. (cherry picked from commit 8a1cc7a) Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> * pr/751: CLOUDSTACK-8766: Fix infinite scrolling pagination for zonal iso/template listing Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 parents 53cba7c + a6e8cfd commit 215a43d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎ui/scripts/templates.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,10 @@
879879
dataProvider: function(args) {
880880
var data = {};
881881
listViewDataProvider(args, data);
882+
// Due to zonal grouping, low pagesize can result lower
883+
// aggregated items, resulting in no scroll shown
884+
// So, use maximum pagesize
885+
data.pagesize = 200;
882886

883887
var ignoreProject = false;
884888
if (args.filterBy != null) { //filter dropdown
@@ -2024,6 +2028,10 @@
20242028
dataProvider: function(args) {
20252029
var data = {};
20262030
listViewDataProvider(args, data);
2031+
// Due to zonal grouping, low pagesize can result lower
2032+
// aggregated items, resulting in no scroll shown
2033+
// So, use maximum pagesize
2034+
data.pagesize = 200;
20272035

20282036
var ignoreProject = false;
20292037
if (args.filterBy != null) { //filter dropdown

0 commit comments

Comments
 (0)