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
const columns = [
{
@ -157,16 +156,7 @@
}).showToast();
}
onMount(() => {
RunnerService.runnerControllerGetAll().then((val) => {
current_runners = val;
dataLoaded = true;
options.update((options) => ({
...options,
data: current_runners,
}));
});
onMount(async () => {
RunnerTeamService.runnerTeamControllerGetAll().then((val) => {
teams = val;
});
@ -175,6 +165,26 @@
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>