Repository: cloudstack Updated Branches: refs/heads/4.5 e967df9ef -> 5a6928c67
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. In theory, there is still a chance if there are several 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. Page size set based on experimental data: https://github.com/apache/cloudstack/pull/751#issuecomment-135661968 Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/069e3f92 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/069e3f92 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/069e3f92 Branch: refs/heads/4.5 Commit: 069e3f92adb3d047011b2ca2cb7eb6c18cd707a8 Parents: 5522120 Author: Rohit Yadav <[email protected]> Authored: Thu Aug 27 12:31:04 2015 +0530 Committer: Rohit Yadav <[email protected]> Committed: Fri Aug 28 13:06:13 2015 +0530 ---------------------------------------------------------------------- ui/scripts/templates.js | 6 ++++++ 1 file changed, 6 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/069e3f92/ui/scripts/templates.js ---------------------------------------------------------------------- diff --git a/ui/scripts/templates.js b/ui/scripts/templates.js index ffad8e2..6d09b51 100644 --- a/ui/scripts/templates.js +++ b/ui/scripts/templates.js @@ -586,6 +586,9 @@ dataProvider: function(args) { var data = {}; listViewDataProvider(args, data); + // Due to zonal grouping, low pagesize can result lower + // aggregated items, resulting in no scroll shown + data.pagesize = 200; var ignoreProject = false; if (args.filterBy != null) { //filter dropdown @@ -1727,6 +1730,9 @@ dataProvider: function(args) { var data = {}; listViewDataProvider(args, data); + // Due to zonal grouping, low pagesize can result lower + // aggregated items, resulting in no scroll shown + data.pagesize = 200; var ignoreProject = false; if (args.filterBy != null) { //filter dropdown
