mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
(cherry picked from commit 3877ba075acbff5385e09065ce4247c44c1c1506)
This commit is contained in:
parent
268ccc3071
commit
bf630b4606
@ -271,6 +271,15 @@ define(function(require) {
|
||||
});
|
||||
that.initrdFilesTable.refreshResourceTableSelect();
|
||||
|
||||
$("input[name='firmware_type']", context).change(function() {
|
||||
if ($("input[name='firmware_type']:checked", context).val() === "custom") {
|
||||
$("#customFirmware", context).show();
|
||||
}
|
||||
else{
|
||||
$("#customFirmware", context).hide();
|
||||
}
|
||||
});
|
||||
|
||||
fillMachineTypesAndCPUModel(context);
|
||||
|
||||
}
|
||||
@ -340,6 +349,13 @@ define(function(require) {
|
||||
osJSON["BOOT"] = "";
|
||||
}
|
||||
|
||||
if ($("input[name='firmware_type']:checked", context).val() === "custom") {
|
||||
osJSON["FIRMWARE"] = $("#customFirmwarePath", context).val();
|
||||
}
|
||||
else{
|
||||
osJSON["FIRMWARE"] = $("input[name='firmware_type']:checked", context).val();
|
||||
}
|
||||
|
||||
if (!$.isEmptyObject(osJSON)) {
|
||||
templateJSON["OS"] = osJSON;
|
||||
}
|
||||
@ -377,9 +393,13 @@ define(function(require) {
|
||||
|
||||
WizardFields.fill(context, osJSON);
|
||||
|
||||
if (osJSON && osJSON["BOOT"]) {
|
||||
if (osJSON["BOOT"]) {
|
||||
_fillBootValue(context, osJSON["BOOT"]);
|
||||
}
|
||||
|
||||
if (osJSON["FIRMWARE"]){
|
||||
_fillFirmwareValue(context, osJSON["FIRMWARE"]);
|
||||
}
|
||||
}
|
||||
|
||||
var featuresJSON = templateJSON["FEATURES"];
|
||||
@ -513,4 +533,18 @@ define(function(require) {
|
||||
_refreshBootValue(context);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Firmware options
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
function _fillFirmwareValue(context, value) {
|
||||
if ($("input[name='firmware_type'][value='" + value + "']", context).length){
|
||||
$("input[name='firmware_type'][value='" + value + "']", context).click();
|
||||
}
|
||||
else {
|
||||
$("input[name='firmware_type'][value='custom']", context).click();
|
||||
$("#customFirmwarePath", context).val(value);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -105,6 +105,34 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row not_firecracker">
|
||||
<div class="large-12 columns not_lxc">
|
||||
<label>
|
||||
{{tr "Firmware"}}
|
||||
{{{tip (tr "This attribute allows to define the type of firmware used to boot the VM")}}}
|
||||
</label>
|
||||
<div class="large-12 columns text-center">
|
||||
<input id="none{{uniqueId}}" type="radio" name="firmware_type" value="" checked/>
|
||||
<label for="none{{uniqueId}}">{{tr "None"}}</label>
|
||||
<input id="bios{{uniqueId}}" type="radio" name="firmware_type" value="BIOS"/>
|
||||
<label for="bios{{uniqueId}}">{{tr "BIOS"}}</label>
|
||||
<input id="ovmfCode{{uniqueId}}" type="radio" name="firmware_type" value="/usr/share/OVMF/OVMF_CODE.fd" class="only_kvm"/>
|
||||
<label for="ovmfCode{{uniqueId}}" class="only_kvm">{{tr "OVMF_CODE.fd"}}</label>
|
||||
<input id="ovmfCodeSecboot{{uniqueId}}" type="radio" name="firmware_type" value="/usr/share/OVMF/OVMF_CODE.secboot.fd" class="only_kvm"/>
|
||||
<label for="ovmfCodeSecboot{{uniqueId}}" class="only_kvm">{{tr "OVMF_CODE.secboot.fd"}}</label>
|
||||
<input id="custom{{uniqueId}}" type="radio" name="firmware_type" value="custom" class="only_kvm"/>
|
||||
<label for="custom{{uniqueId}}" class="only_kvm">{{tr "Custom"}}</label>
|
||||
<input id="efi{{uniqueId}}" type="radio" name="firmware_type" value="EFI" class="only_vcenter"/>
|
||||
<label for="efi{{uniqueId}}" class="only_vcenter">{{tr "EFI"}}</label>
|
||||
</div>
|
||||
<div id="customFirmware" hidden>
|
||||
<label>
|
||||
{{tr "Custom Firmware Path"}}
|
||||
<input type="text" id="customFirmwarePath"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="kernelTab{{uniqueId}}" class="wizard_internal_tab tabs-panel kernelTab">
|
||||
<div class="row">
|
||||
|
Loading…
x
Reference in New Issue
Block a user