v0.318.0: the internal data place, partitions, an honest whole-box backup offer (R-1084), sys_drive never offered (R-1082)
gates / gates (push) Successful in 46s

felhom.eu architecture/16 §4-§6 (build B). MinAgent 0.157.0 — the internal place and the partitions appear only when
agent >= 0.158.0 reports them. Tests red-proved; four parity fixtures refreshed (only the new lines).

Claude-Session: https://claude.ai/code/session_012qRErfCoiTkvDK9N5XHbzb
This commit is contained in:
2026-10-16 03:57:49 +02:00
parent 123d2d553f
commit a43d0423d5
28 changed files with 913 additions and 26 deletions
@@ -243,6 +243,20 @@ async function loadDisks(){
var cands = (j.data&&j.data.attach)||[];
if(cands.length===0){ document.getElementById('disk-list').innerHTML='<p class="form-hint">Nincs csatolható meghajtó — a csatoláshoz olyan (még nem használt) meghajtó kell, amelyen már van fájlrendszer. Új, üres meghajtóhoz használd az „Inicializálás” lehetőséget.</p>'; return; }
var html='<div class="drive-list">';
var flat=[];
cands.forEach(function(d){
var usable=(d.partitions||[]).filter(function(p){ return p.state==='filesystem' && p.mountable; });
if(!d.already_mounted && d.partitions && d.partitions.length){
usable.forEach(function(p){ flat.push({device:p.device, mount_source:p.device, fstype:p.fstype, size_bytes:p.size_bytes,
model:(d.model?d.model:d.device)+' — '+'{n}. rész'.replace('{n}', p.number||'?')}); });
return;
}
flat.push(d);
});
cands=flat;
if(cands.length===0){ document.getElementById('disk-list').innerHTML='<p class="form-hint">Nincs csatolható meghajtó — a csatoláshoz olyan (még nem használt) meghajtó kell, amelyen már van fájlrendszer. Új, üres meghajtóhoz használd az „Inicializálás” lehetőséget.</p>'; return; }
cands.forEach(function(d,i){
var title = d.model ? esc(d.model) : esc(d.device);
var parts = [esc(d.device)];
@@ -388,6 +388,8 @@ window.__registeredPaths=[];
if(d.role!=='user-data' || !d.mount_path || d.mount_path.indexOf('/mnt/')!==0) return '';
if(d.kind==='internal') return '';
if(d.backup_target){
return registered[regKey(d)] ? '' : '<div class="drive-actions"><button class="btn btn-xs btn-primary" onclick="registerDrive(\''+esc(d.mount_path)+'\')">Regisztrálás</button></div>';
@@ -353,6 +353,7 @@
</div>
<div class="storage-path-fsinfo mono form-hint">
ext4 · /dev/sdb1 · WD Red
</div>
@@ -403,12 +404,14 @@
<span class="migrate-inline" style="display:inline-flex;gap:.35rem;align-items:center">
<select id="migrate-target-/mnt/hdd1" class="btn btn-xs btn-outline">
<option value="">Áthelyezés ide…</option>
<option value="/mnt/hdd3">HDD három (/mnt/hdd3)</option>
<option value="/mnt/hdd3">HDD három (/mnt/hdd3)</option><option value="/mnt/felhom-drives/belso">Belső tárhely (/mnt/felhom-drives/belso)</option>
</select>
<button class="btn btn-xs btn-outline" onclick="storageMigrateAll('\/mnt\/hdd1','HDD egy')">Összes adat áthelyezése</button>
</span>
<button class="btn btn-xs btn-danger-outline" onclick="storageDecommission('\/mnt\/hdd1','HDD egy', 1 )" title="A meghajtó végleges kivonása a rendszerből. Ha céltárolót választ, előbb minden adat átkerül oda; áthelyezés nélkül az adatok a meghajtón maradnak.">Végleges leszerelés</button>
</div>
</div>
@@ -446,6 +449,7 @@
</div>
<div class="storage-path-fsinfo mono form-hint">
ext4 · /dev/sdc1
</div>
@@ -485,7 +489,9 @@
</form>
<button class="btn btn-xs btn-danger-outline" onclick="storageDecommission('\/mnt\/hdd2','HDD kettő', 0 )" title="A meghajtó végleges kivonása a rendszerből. Ha céltárolót választ, előbb minden adat átkerül oda; áthelyezés nélkül az adatok a meghajtón maradnak.">Végleges leszerelés</button>
</div>
</div>
@@ -524,6 +530,7 @@
<div class="storage-path-meta">
<span class="form-hint">Nincs alkalmazás ezen a tárolón</span>
@@ -551,7 +558,67 @@
<button class="btn btn-xs btn-danger-outline" onclick="storageDecommission('\/mnt\/hdd3','HDD három', 0 )" title="A meghajtó végleges kivonása a rendszerből. Ha céltárolót választ, előbb minden adat átkerül oda; áthelyezés nélkül az adatok a meghajtón maradnak.">Végleges leszerelés</button>
</div>
</div>
<div class="storage-path-item">
<div class="storage-path-header">
<div class="storage-path-info">
<div class="storage-path-label-wrap" id="label-wrap-/mnt/felhom-drives/belso">
<span class="storage-path-label" id="label-display-/mnt/felhom-drives/belso">Belső tárhely</span>
<button class="btn btn-xs btn-ghost" onclick="editStorageLabel('\/mnt\/felhom-drives\/belso', 'Belső tárhely')" title="Átnevezés"><svg class="ico ico-sm"><use href="#i-pencil"/></svg></button>
</div>
<span class="storage-path-path mono">/mnt/felhom-drives/belso</span>
</div>
<div class="storage-path-badges">
<span class="tag tag-run"><span class="dot"></span>Aktív</span>
<span class="badge" style="background:rgba(255,165,0,0.15);color:var(--warn)">USB</span>
</div>
</div>
<div class="storage-path-details">
<div class="form-hint">A gép saját lemezén van, de nem része a teljes rendszermentésnek. Egy lemezhiba ellen egy másik lemez vagy a távoli mentés véd.</div>
<div class="storage-path-meta">
<span class="form-hint">Nincs alkalmazás ezen a tárolón</span>
</div>
<div class="drive-agent-extra" id="agent-extra-/mnt/felhom-drives/belso"></div>
</div>
<div class="storage-path-actions">
<form method="POST" action="/settings/storage/default" style="display:inline">
<input type="hidden" name="storage_path" value="/mnt/felhom-drives/belso">
<button type="submit" class="btn btn-xs btn-outline">Legyen alapértelmezett</button>
</form>
<form method="POST" action="/settings/storage/schedulable" style="display:inline">
<input type="hidden" name="storage_path" value="/mnt/felhom-drives/belso">
<input type="hidden" name="schedulable" value="false">
<button type="submit" class="btn btn-xs btn-outline" title="A meghajtó kimarad az új alkalmazás-telepítésekből. A rajta lévő alkalmazások változatlanul futnak.">Új telepítések letiltása</button>
</form>
</div>
</div>
@@ -629,7 +696,7 @@
<div id="confirm-root"></div>
<div id="dialog-root"></div>
<script>
window.__registeredPaths=["\/mnt\/usb1","\/mnt\/old","\/mnt\/hdd1","\/mnt\/hdd2","\/mnt\/hdd3",];
window.__registeredPaths=["\/mnt\/usb1","\/mnt\/old","\/mnt\/hdd1","\/mnt\/hdd2","\/mnt\/hdd3","\/mnt\/felhom-drives\/belso",];
(function(){
function esc(s){ return String(s==null?'':s).replace(/[&<>"]/g,function(c){return {'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;'}[c];}); }
function hum(b){ if(!b||b<=0) return ''; var u=['B','KB','MB','GB','TB'],i=0,v=b; while(v>=1024&&i<u.length-1){v/=1024;i++;} return (v>=10||i===0?Math.round(v):fhNum(v, 1))+' '+u[i]; }
@@ -688,6 +755,8 @@ window.__registeredPaths=["\/mnt\/usb1","\/mnt\/old","\/mnt\/hdd1","\/mnt\/hdd2"
if(d.role!=='user-data' || !d.mount_path || d.mount_path.indexOf('/mnt/')!==0) return '';
if(d.kind==='internal') return '';
if(d.backup_target){
return registered[regKey(d)] ? '' : '<div class="drive-actions"><button class="btn btn-xs btn-primary" onclick="registerDrive(\''+esc(d.mount_path)+'\')">Regisztrálás</button></div>';
@@ -256,16 +256,26 @@ async function loadDisks(){
var cands = (j.data&&j.data.initialize)||[];
if(cands.length===0){ document.getElementById('disk-list').innerHTML='<p class="form-hint">Nincs elérhető meghajtó az inicializáláshoz. Csatlakoztass egy új adathordozót — a rendszer-, a biztonsági mentés- és a már használatban lévő meghajtók itt nem jelennek meg.</p>'; return; }
var html='<div class="drive-list">';
cands.forEach(function(d,i){
var n=0;
function card(dev, title, sub, db){
var i=n++;
return '<label class="drive-card role-user-data is-selectable" id="dc-'+i+'">'
+'<div class="drive-card-top"><div class="drive-select"><input type="radio" name="disk" value="'+esc(dev)+'" data-db="'+(db?'1':'0')+'" data-i="'+i+'" onchange="pickDisk(this)">'
+'<div class="drive-id"><span class="drive-name">'+title+'</span><span class="drive-sub">'+sub+'</span></div></div>'
+'<div class="drive-badges">'+dataBadge({data_bearing:db})+'</div></div></label>';
}
cands.forEach(function(d){
var title = d.model ? esc(d.model) : esc(d.device);
var parts = [esc(d.device)];
if(d.size_bytes) parts.push(fmtSize(d.size_bytes));
if(d.fstype) parts.push('jelenlegi: '+esc(d.fstype));
var sub = parts.join(' · ');
html+='<label class="drive-card role-user-data is-selectable" id="dc-'+i+'">'
+'<div class="drive-card-top"><div class="drive-select"><input type="radio" name="disk" value="'+esc(d.device)+'" data-db="'+(d.data_bearing?'1':'0')+'" data-i="'+i+'" onchange="pickDisk(this)">'
+'<div class="drive-id"><span class="drive-name">'+title+'</span><span class="drive-sub">'+sub+'</span></div></div>'
+'<div class="drive-badges">'+dataBadge(d)+'</div></div></label>';
if(!d.whole_disk_in_use) html+=card(d.device, title, parts.join(' · '), d.data_bearing);
(d.partitions||[]).forEach(function(p){
if(p.state!=='empty' && p.state!=='filesystem') return;
var ps=[esc(p.device)]; if(p.size_bytes) ps.push(fmtSize(p.size_bytes)); if(p.fstype) ps.push('jelenlegi: '+esc(p.fstype));
html+=card(p.device, title+' — '+'{n}. rész'.replace('{n}', p.number||'?'), ps.join(' · '), p.state==='filesystem');
});
});
html+='</div>';
document.getElementById('disk-list').innerHTML=html;