Implementato contatore rebuild completati
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user