Merge funzionalità aggioramento 2.7.1 #2

Merged
AndreStork merged 8 commits from update/2.7 into main 2026-03-26 11:11:31 +00:00
Showing only changes of commit 53460bd70e - Show all commits

View File

@@ -1157,7 +1157,7 @@
<div class="head">
<h2>💻 Terminale Linux (simulato)</h2>
<div class="pills">
<div class="pill"><strong>Rebuild effettuati</strong> <span id="pillRebuildCount">0</span></div>
<div class="pill"><strong>Rebuild effettuati</strong> <span id="pillRebuildCount">727</span></div>
<div class="pill"><strong>Mode</strong> <span id="pillMode">LAB</span></div>
</div>
</div>
@@ -3277,6 +3277,7 @@ $ rm /mnt/verifica.txt
hints: 0,
teacher: false,
mode: "LAB",
rebuildCount: 0,
exerciseOn: false,
timer: { on:false, endTs:0, interval:null },
actions: [],
@@ -3322,6 +3323,7 @@ $ rm /mnt/verifica.txt
const termBody = $("termBody");
const termInput = $("termInput");
const btnRun = $("btnRun");
const pillRebuildCountEl = $("pillRebuildCount");
let history = [];
let histIdx = -1;
@@ -3430,6 +3432,7 @@ $ rm /mnt/verifica.txt
state.disks.forEach(d=>{ if(d.state===DiskState.REBUILDING){d.state=DiskState.OK;d.progress=0;d.smart.realloc=0;d.smart.pending=0;d.smart.crc=0;d.smart.temp=33;} });
pushDmesg("info","md0: rebuild completed");
termPrint("mdadm: rebuild completato. ✅","ok");
state.rebuildCount+=1;
const rf=state.rebuild.speedFactor||1, rs=state.rebuild.realSec||0;
const rm=Math.round(rs/60), rh=(rs>=3600)?` = ${(rs/3600).toFixed(1)}h`:"";
termPrint(` Ricorda: nella realtà questa operazione avrebbe richiesto ~${rm} min${rh}`,"warn");
@@ -3619,6 +3622,7 @@ $ rm /mnt/verifica.txt
}
function render(){
pillRebuildCountEl.textContent=state.rebuildCount;
pillArrayEl.textContent=state.arrayName;
const n=state.disks.length,L=state.raidLevel,sizeGB=state.diskSizeGB;
capValueEl.textContent=fmtGB(capacityGB(L,n,sizeGB));