@@ -178,13 +178,26 @@
|
||||
}
|
||||
|
||||
onMount(async () => {
|
||||
const scans = await ScanService.scanControllerGetAll();
|
||||
current_scans = scans;
|
||||
options.update((options) => ({
|
||||
...options,
|
||||
data: current_scans,
|
||||
}));
|
||||
dataLoaded = true;
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user