0.12.0: FIFO job retention (job_keep), clear-finished button, vmm-ctl prune

This commit is contained in:
Claw committed 2026-11-17 21:38:56 +01:00
1 parent 5dc6bfb5a2
commit a1b4e884da
9 files changed
+83 -3

No files matched your search

+9
View File
@@ -10,6 +10,8 @@ if (strtoupper((string)($_SERVER['REQUEST_METHOD'] ?? '')) === 'POST' && ($_POST
$conf = vmm_config();
$conf['after_action'] = ($_POST['after_action'] ?? 'stay') === 'log' ? 'log' : 'stay';
$conf['vm_source'] = in_array($_POST['vm_source'] ?? '', ['auto', 'system', 'bundle'], true) ? $_POST['vm_source'] : 'auto';
$keep = (int)($_POST['job_keep'] ?? 100);
$conf['job_keep'] = ($keep >= 0 && $keep <= 10000) ? $keep : 100;
vmm_save_config($conf);
$_SESSION['vmmngr_error'] = gettext('Settings saved.');
header('Location: vmmngr_config.php');
@@ -55,6 +57,13 @@ vmm_nav('config'); ?>
<button type="submit" class="formbtn" name="act" value="save_settings" style="margin-left:8px;"><?=gettext('Save');?></button>
</td>
</tr>
<tr>
<td class="celltag"><?=gettext('Job retention');?></td>
<td class="celldata">
<input type="text" name="job_keep" size="6" value="<?=(int)($conf['job_keep'] ?? 100);?>"/>
<span style="opacity:.75;margin-left:8px;"><?=gettext('finished jobs to keep (FIFO); 0 = delete after each run');?></span>
</td>
</tr>
<tr>
<td class="celltag">vm_source</td>
<td class="celldata">