revert: buggy pagination
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-05-04 14:32:37 +02:00
parent 53e3ddb751
commit b2648645e8
4 changed files with 28 additions and 75 deletions

View File

@@ -178,26 +178,13 @@
}
onMount(async () => {
let page = 0;
let pagesize = 100;
while (page >= 0) {
const scans = await ScanService.scanControllerGetAll(page, pagesize);
if (scans.length == 0) {
page = -2;
}
current_scans = current_scans.concat(...scans);
options.update((options) => ({
...options,
data: current_scans,
}));
dataLoaded = true;
page++;
if (pagesize < 1000) {
pagesize += 100;
}
}
const scans = await ScanService.scanControllerGetAll();
current_scans = scans;
options.update((options) => ({
...options,
data: current_scans,
}));
dataLoaded = true;
});
</script>