feature/175-request_pagination #176

Merged
niggl merged 5 commits from feature/175-request_pagination into dev 2023-04-19 13:37:17 +00:00
Showing only changes of commit faf3893180 - Show all commits

View File

@ -50,7 +50,6 @@
})); }));
}; };
//Section table //Section table
const columns = [ const columns = [
{ {
@ -157,16 +156,7 @@
}).showToast(); }).showToast();
} }
onMount(() => { onMount(async () => {
RunnerService.runnerControllerGetAll().then((val) => {
current_runners = val;
dataLoaded = true;
options.update((options) => ({
...options,
data: current_runners,
}));
});
RunnerTeamService.runnerTeamControllerGetAll().then((val) => { RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
teams = val; teams = val;
}); });
@ -175,6 +165,26 @@
orgs = val; orgs = val;
} }
); );
let page = 0;
while (page >= 0) {
const runners = await RunnerService.runnerControllerGetAll(page, 1000);
if (runners.length == 0) {
page = -2;
}
current_runners = current_runners.concat(...runners);
options.update((options) => ({
...options,
data: current_runners,
}));
if (page == 0) {
dataLoaded = true;
}
page++;
}
console.log("All runners loaded");
}); });
</script> </script>