ui: New button to launch all tests
This commit is contained in:
parent
936a8a80f4
commit
6f9b83ef24
@ -32,6 +32,18 @@
|
||||
repositoriesP[userid] = getRepositories(wid, userid);
|
||||
}
|
||||
|
||||
async function runGradations() {
|
||||
for (const user of await usersP) {
|
||||
if (repositoriesP[user.id]) {
|
||||
try {
|
||||
for (const repo of await repositoriesP[user.id]) {
|
||||
repo.runGradation();
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let nb_rendus = 0;
|
||||
let nb_users = 0;
|
||||
|
||||
@ -40,13 +52,24 @@
|
||||
let search_repo_for = {repo: null, user: null};
|
||||
</script>
|
||||
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="d-flex justify-content-between">
|
||||
<div class="d-flex align-items-center">
|
||||
<h2>
|
||||
<a href="works/{w.id}" class="text-muted" style="text-decoration: none"><</a>
|
||||
{w.title}
|
||||
<small class="text-muted">Rendus {Math.trunc(nb_rendus/nb_users*100)} % ({nb_rendus}/{nb_users})</small>
|
||||
</h2>
|
||||
<SurveyBadge class="ms-2" survey={w} />
|
||||
</div>
|
||||
<div>
|
||||
<button
|
||||
class="btn btn-sm btn-success mr-1"
|
||||
title="Relancer les tests"
|
||||
on:click={runGradations}
|
||||
>
|
||||
<i class="bi bi-play"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#await usersP then users}
|
||||
|
Reference in New Issue
Block a user