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);
|
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_rendus = 0;
|
||||||
let nb_users = 0;
|
let nb_users = 0;
|
||||||
|
|
||||||
@ -40,13 +52,24 @@
|
|||||||
let search_repo_for = {repo: null, user: null};
|
let search_repo_for = {repo: null, user: null};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="d-flex align-items-center">
|
<div class="d-flex justify-content-between">
|
||||||
<h2>
|
<div class="d-flex align-items-center">
|
||||||
<a href="works/{w.id}" class="text-muted" style="text-decoration: none"><</a>
|
<h2>
|
||||||
{w.title}
|
<a href="works/{w.id}" class="text-muted" style="text-decoration: none"><</a>
|
||||||
<small class="text-muted">Rendus {Math.trunc(nb_rendus/nb_users*100)} % ({nb_rendus}/{nb_users})</small>
|
{w.title}
|
||||||
</h2>
|
<small class="text-muted">Rendus {Math.trunc(nb_rendus/nb_users*100)} % ({nb_rendus}/{nb_users})</small>
|
||||||
<SurveyBadge class="ms-2" survey={w} />
|
</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>
|
</div>
|
||||||
|
|
||||||
{#await usersP then users}
|
{#await usersP then users}
|
||||||
|
Reference in New Issue
Block a user