Add bzimage/initrd to UI

This commit is contained in:
Fabian 2022-03-10 21:28:53 +01:00
parent 48882e33ae
commit 193ec30038
3 changed files with 36 additions and 0 deletions

View file

@ -167,6 +167,15 @@ function load_next()
<td><input type="file" id="multiboot_image"><br></td>
</tr>
<tr>
<td><label for="bzimage">Kernel image (bzimage)</label></td>
<td><input type="file" id="bzimage"><br></td>
</tr>
<tr>
<td><label for="initrd">initrd</label></td>
<td><input type="file" id="initrd"><br></td>
</tr>
<tr>
<td colspan="2"><small>Disk images are not uploaded to the server</small><hr></td>
</tr>

View file

@ -91,6 +91,15 @@
</tr>
-->
<tr>
<td><label for="bzimage">Kernel image (bzimage)</label></td>
<td><input type="file" id="bzimage"><br></td>
</tr>
<tr>
<td><label for="initrd">initrd</label></td>
<td><input type="file" id="initrd"><br></td>
</tr>
<tr>
<td colspan="2"><small>Disk images are not uploaded to the server</small><hr></td>

View file

@ -1086,6 +1086,24 @@
}
}
if(!settings.bzimage)
{
var bzimage = $("bzimage").files[0];
if(bzimage)
{
settings.bzimage = { buffer: bzimage };
}
}
if(!settings.initrd)
{
var initrd = $("initrd").files[0];
if(initrd)
{
settings.initrd = { buffer: initrd };
}
}
const networking_proxy = settings.networking_proxy === undefined ? $("networking_proxy").value : settings.networking_proxy;
const disable_audio = settings.audio === undefined ? $("disable_audio").checked : !settings.audio;
const enable_acpi = settings.acpi === undefined ? $("enable_acpi").checked : settings.acpi;