ajoute le stock chaud, la correction automatique et les nouveaux essais de création de stack
Stock de stacks prêtes par lab dans Redis (prise atomique en Lua, ménage par comparaison avec Heat, disjoncteur), files gérées par Horizon, séances planifiables. Correcteur Go sur l'hyperviseur : socket Unix, commandes lues dans le lab.yaml uniquement, exécution par l'agent invité QEMU. Une création de stack ratée est supprimée et réessayée deux fois, puis la session passe en échec, visible du prof. Corrige aussi trois défauts des étapes précédentes : la console se coupait à la première frappe d'un navigateur (trames texte), l'élève ne pouvait pas rejoindre une séance, la déconnexion n'avait pas de jeton CSRF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ca2f6f3b7a
commit
80b6c0722d
71 changed files with 2959 additions and 170 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
@section('titre', "Salle d'attente")
|
||||
|
||||
@php($etats = \App\Models\LabSession::class)
|
||||
|
||||
@section('contenu')
|
||||
<meta http-equiv="refresh" content="10">
|
||||
<div class="mx-auto max-w-4xl px-5 py-14 lg:px-10">
|
||||
|
|
@ -14,20 +16,41 @@
|
|||
@else
|
||||
<ul class="mt-8 grid gap-3">
|
||||
@foreach ($seance->labSessions as $labSession)
|
||||
<li class="flex items-center justify-between gap-4 border border-[#e3e5e8] rounded-2xl bg-white p-4">
|
||||
<li class="flex flex-wrap items-center justify-between gap-4 rounded-2xl border border-[#e3e5e8] bg-white p-4">
|
||||
<span class="font-extrabold">{{ $labSession->eleve->nomAffiche() }}</span>
|
||||
@if ($labSession->etat === \App\Models\LabSession::EN_ATTENTE)
|
||||
<form action="{{ route('seances.admettre', [$seance, $labSession]) }}" method="post">
|
||||
@csrf
|
||||
<button type="submit" class="inline-flex h-10 items-center rounded-full bg-[#0b57d0] px-4 font-bold text-white">Admettre</button>
|
||||
</form>
|
||||
@else
|
||||
<span class="flex items-center gap-3">
|
||||
<span class="rounded-lg border border-[#dadce0] bg-[#e6f4ea] px-3 py-1 font-mono text-sm font-bold">Admis</span>
|
||||
@if ($labSession->machines->isNotEmpty())
|
||||
<span class="flex flex-wrap items-center gap-3">
|
||||
@switch($labSession->etat)
|
||||
@case($etats::EN_ATTENTE)
|
||||
<form action="{{ route('seances.admettre', [$seance, $labSession]) }}" method="post">
|
||||
@csrf
|
||||
<button type="submit" class="inline-flex h-10 items-center rounded-full bg-[#0b57d0] px-4 font-bold text-white">Admettre</button>
|
||||
</form>
|
||||
@break
|
||||
@case($etats::ADMIS)
|
||||
<span class="rounded-lg border border-[#dadce0] bg-[#fef7e0] px-3 py-1 font-mono text-sm font-bold">Préparation des VM…</span>
|
||||
@break
|
||||
@case($etats::ACTIF)
|
||||
<span class="rounded-lg border border-[#dadce0] bg-[#e6f4ea] px-3 py-1 font-mono text-sm font-bold">Admis</span>
|
||||
@if ($labSession->derniereCorrection)
|
||||
<span class="font-mono text-sm font-bold">
|
||||
{{ $labSession->derniereCorrection->reussi ? 'Réussi' : 'En cours' }} · {{ $labSession->derniereCorrection->note }}/{{ $labSession->derniereCorrection->note_max }}
|
||||
</span>
|
||||
@endif
|
||||
<a href="{{ route('seances.console.prof.page', [$seance, $labSession]) }}" class="font-bold underline underline-offset-4">Voir sa console</a>
|
||||
@endif
|
||||
</span>
|
||||
@break
|
||||
@case($etats::ECHEC)
|
||||
<span class="rounded-lg border border-[#A63D2A] bg-[#fce8e6] px-3 py-1 font-mono text-sm font-bold" title="{{ $labSession->raison_echec }}">Échec du lancement (3 essais)</span>
|
||||
<form action="{{ route('seances.admettre', [$seance, $labSession]) }}" method="post">
|
||||
@csrf
|
||||
<button type="submit" class="inline-flex h-10 items-center rounded-full bg-black px-4 font-bold text-white">Réessayer</button>
|
||||
</form>
|
||||
@break
|
||||
@default
|
||||
<span class="rounded-lg border border-[#dadce0] px-3 py-1 font-mono text-sm font-bold">Terminé</span>
|
||||
@endswitch
|
||||
</span>
|
||||
@if ($labSession->etat === $etats::ECHEC && $labSession->raison_echec)
|
||||
<p class="w-full font-mono text-xs text-[#5f6368]">{{ $labSession->raison_echec }}</p>
|
||||
@endif
|
||||
</li>
|
||||
@endforeach
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue