0.4.0: ISO install (attach CD devices incl. virtio-win driver ISO), eject, virtio-win download preset
This commit is contained in:
1 parent
e989df97a5
commit
c577f3c96f
5 files changed
+232
-2
No files matched your search
@@ -12,7 +12,19 @@ $post = strtoupper((string)($_SERVER['REQUEST_METHOD'] ?? '')) === 'POST';
|
||||
$act = $post ? (string)($_POST['act'] ?? '') : '';
|
||||
$confirm = $post ? (string)($_POST['confirm'] ?? '') : '';
|
||||
|
||||
$presets = [
|
||||
'virtio' => ['kind' => 'iso', 'url' => 'https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso'],
|
||||
];
|
||||
|
||||
if ($post && $act !== '') {
|
||||
if (str_starts_with($act, 'preset:')) {
|
||||
$key = substr($act, 7);
|
||||
if (isset($presets[$key])) {
|
||||
$job = vmm_job_new($presets[$key]['kind'] . '_download', $key, [$presets[$key]['kind'], $presets[$key]['url']], 21600);
|
||||
header('Location: vmmngr_jobs.php?id=' . urlencode((string)$job['id']));
|
||||
exit;
|
||||
}
|
||||
}
|
||||
if ($act === 'download') {
|
||||
$kind = (string)($_POST['kind'] ?? 'iso');
|
||||
$url = trim((string)($_POST['url'] ?? ''));
|
||||
@@ -97,6 +109,13 @@ function vmmAskDelete(name) {
|
||||
<span style="opacity:.75;margin-left:8px;"><?=gettext('Downloads run as a job in the background.');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="celltag"><?=gettext('Presets');?></td>
|
||||
<td class="celldata">
|
||||
<button type="submit" class="formbtn" name="act" value="preset:virtio"><?=gettext('virtio-win drivers ISO');?></button>
|
||||
<span style="opacity:.75;margin-left:8px;"><?=gettext('Official stable build - needed by Windows guests for disk/network drivers.');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in new issue
Block a user