mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-10 01:17:40 +03:00
parent
03fef86d3c
commit
c4e9dcf97f
@ -221,11 +221,41 @@ define(function(require) {
|
||||
// All KVM settings are available in LXD plus
|
||||
// Privileged, Profile and Security Nesting
|
||||
|
||||
if (this.value == "lxd"){
|
||||
if (this.value == "lxd") {
|
||||
$('.only_lxd').show();
|
||||
$('.not_lxd').hide();
|
||||
$('.raw_type').val('lxd');
|
||||
}
|
||||
|
||||
var formContext = "#createVMTemplateFormWizard";
|
||||
var NUMA_THREADS_MIN = 1;
|
||||
var NUMA_THREADS_MAX = 2;
|
||||
if (this.value == "firecracker") {
|
||||
// [GENERAL]
|
||||
$(".cpu_input > input", formContext).val("1");
|
||||
// [NUMA]
|
||||
$("#numa-pin-policy", formContext).val("SHARED");
|
||||
$("#numa-sockets", formContext).val("1");
|
||||
$("#numa-threads", formContext)
|
||||
.prop("max", NUMA_THREADS_MAX)
|
||||
.val(function(_, value) {
|
||||
return (value > NUMA_THREADS_MAX) ? NUMA_THREADS_MAX : NUMA_THREADS_MIN;
|
||||
})
|
||||
|
||||
$('.disabled_firecracker', formContext).prop("disabled", true);
|
||||
$('.not_firecracker', formContext).hide();
|
||||
}
|
||||
else {
|
||||
// [GENERAL]
|
||||
$(".cpu_input > input", formContext).val("");
|
||||
// [NUMA]
|
||||
$("#numa-pin-policy", formContext).val("NONE");
|
||||
$("#numa-sockets", formContext).val("");
|
||||
$("#numa-threads", formContext).removeAttr("max").val("");
|
||||
|
||||
$('.disabled_firecracker', formContext).removeAttr("disabled");
|
||||
$('.not_firecracker', formContext).show();
|
||||
}
|
||||
});
|
||||
|
||||
CapacityCreate.setup($("div.capacityCreate", context));
|
||||
|
@ -101,7 +101,7 @@
|
||||
{{{tip (tr "Percentage of CPU divided by 100 required for the Virtual Machine. Half a processor is written 0.5.")}}}
|
||||
</label>
|
||||
<div class="cpu_input">
|
||||
<input type="number" step="0.01" min="0" wizard_field="CPU" id="CPU" style="margin-bottom:0rem;"/>
|
||||
<input type="number" class="disabled_firecracker" step="0.01" min="0" wizard_field="CPU" id="CPU" style="margin-bottom:0rem;"/>
|
||||
</div>
|
||||
<span style="color:gray;margin-bottom:1rem">
|
||||
<span id="real_cpu_cost" >Cost</span>
|
||||
@ -110,7 +110,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="medium-6 small-12 columns">
|
||||
<div class="medium-6 small-12 columns not_firecracker">
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
<label>
|
||||
|
@ -33,6 +33,8 @@
|
||||
<label for="vcenterRadio">{{tr "vCenter"}}</label>
|
||||
<input type="radio" wizard_field="HYPERVISOR" name="hypervisor" value="lxd" id="lxdRadio">
|
||||
<label for="lxdRadio">{{tr "LXD"}}</label>
|
||||
<input type="radio" wizard_field="HYPERVISOR" name="hypervisor" value="firecracker" id="firecrackerRadio">
|
||||
<label for="firecrackerRadio">{{tr "Firecracker"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
@ -55,6 +55,7 @@ define(function(require) {
|
||||
this.wizardTabId = WIZARD_TAB_ID + UniqueId.id();
|
||||
this.icon = 'fa-cloud';
|
||||
this.title = Locale.tr("Hybrid");
|
||||
this.classes = "not_firecracker";
|
||||
|
||||
this.oneEnabled = false;
|
||||
|
||||
|
@ -119,7 +119,7 @@
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="medium-12 columns hypervisor only_kvm">
|
||||
<div class="medium-12 columns hypervisor only_kvm not_firecracker">
|
||||
<fieldset class="hypervisor only_kvm vm_updateconf_hide">
|
||||
<legend>{{tr "PCI Devices"}}</legend>
|
||||
<div class="row">
|
||||
|
@ -33,7 +33,7 @@
|
||||
<p><br/></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row not_lxd">
|
||||
<div class="row not_lxd not_firecracker">
|
||||
<div class="medium-6 columns">
|
||||
<label for="DEFAULT_MODEL">
|
||||
{{tr "Default hardware model to emulate for all NICs"}}
|
||||
|
@ -242,7 +242,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<fieldset class="not_firecracker">
|
||||
<legend>{{tr "Override Network Inbound Traffic QoS"}}</legend>
|
||||
<div class="row">
|
||||
<div class="medium-4 columns">
|
||||
@ -265,7 +265,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<fieldset class="not_firecracker">
|
||||
<legend>{{tr "Override Network Outbound Traffic QoS"}}</legend>
|
||||
<div class="row">
|
||||
<div class="medium-4 columns">
|
||||
@ -288,7 +288,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<fieldset class="not_firecracker">
|
||||
<legend>{{tr "Hardware"}}</legend>
|
||||
<div class="row">
|
||||
<div class="small-12 columns">
|
||||
|
@ -30,17 +30,21 @@
|
||||
{{tr "Pin Policy"}}
|
||||
{{{tip (tr "vCPU pinning preference: CORE, THREAD, SHARED, NONE")}}}
|
||||
</label>
|
||||
<select id="numa-pin-policy">
|
||||
<select id="numa-pin-policy" class="disabled_firecracker">
|
||||
<option value="NONE">{{tr "none"}}</option>
|
||||
<option value="THREAD">{{tr "thread"}}</option>
|
||||
<option value="SHARED">{{tr "shared"}}</option>
|
||||
<option value="CORE">{{tr "core"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="small-6 columns">
|
||||
<label for="numa-sockets">
|
||||
{{tr "Sockets"}}
|
||||
{{{tip (tr "Number of sockets or NUMA nodes")}}}
|
||||
</label>
|
||||
<input type="number" id="numa-sockets">
|
||||
<input type="number" id="numa-sockets" class="disabled_firecracker">
|
||||
</div>
|
||||
<div class="small-6 columns">
|
||||
<label for="numa-cores">
|
||||
{{tr "Cores"}}
|
||||
{{{tip (tr "Number of cores per node")}}}
|
||||
@ -52,12 +56,16 @@
|
||||
{{tr "Threads"}}
|
||||
{{{tip (tr "Number of threads per core")}}}
|
||||
</label>
|
||||
<input type="number" id="numa-threads">
|
||||
<input type="number" id="numa-threads" min="1">
|
||||
</div>
|
||||
<div class="small-6 columns not_firecracker">
|
||||
<label for="numa-hugepages">
|
||||
{{tr "Hugepages Size"}}
|
||||
{{{tip (tr "Size of the hugepages (MB). If not defined no hugepages will be used")}}}
|
||||
</label>
|
||||
<select id="numa-hugepages"></select>
|
||||
</div>
|
||||
<div class="small-6 columns not_firecracker">
|
||||
<label for="numa-memory">
|
||||
{{tr "Memory Access"}}
|
||||
{{{tip (tr "Control if the memory is to be mapped shared or private")}}}
|
||||
|
@ -22,13 +22,13 @@
|
||||
<li class="tabs-title vm_updateconf_hide only_kvm not_lxd">
|
||||
<a href="#kernelTab{{uniqueId}}">{{tr "Kernel"}}</a>
|
||||
</li>
|
||||
<li class="tabs-title vm_updateconf_hide only_kvm not_lxd">
|
||||
<li class="tabs-title vm_updateconf_hide only_kvm not_lxd not_firecracker">
|
||||
<a href="#ramdiskTab{{uniqueId}}">{{tr "Ramdisk"}}</a>
|
||||
</li>
|
||||
<li class="tabs-title only_kvm not_lxd">
|
||||
<li class="tabs-title only_kvm not_lxd not_firecracker">
|
||||
<a href="#featuresTab{{uniqueId}}">{{tr "Features"}}</a>
|
||||
</li>
|
||||
<li class="tabs-title only_kvm not_lxd">
|
||||
<li class="tabs-title only_kvm not_lxd not_firecracker">
|
||||
<a href="#cpuTab{{uniqueId}}">{{tr "CPU Model"}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="tabs-content vertical" data-tabs-content="osTabs">
|
||||
<div class="wizard_internal_tab is-active tabs-panel bootTab" id="bootTab{{uniqueId}}">
|
||||
<div class="row">
|
||||
<div class="medium-4 columns only_kvm not_lxd">
|
||||
<div class="medium-4 columns only_kvm not_lxd not_firecracker">
|
||||
<label>
|
||||
{{tr "CPU Architecture"}}
|
||||
<select wizard_field="ARCH">
|
||||
@ -47,18 +47,18 @@
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="medium-4 columns hypervisor only_kvm not_lxd">
|
||||
<div class="medium-4 columns hypervisor only_kvm not_lxd not_firecracker">
|
||||
<label id="sd-disk-bus-info">
|
||||
{{tr "Bus for SD disks"}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="medium-4 columns hypervisor only_kvm not_lxd">
|
||||
<div class="medium-4 columns hypervisor only_kvm not_lxd not_firecracker">
|
||||
<label id="kvm-info">
|
||||
{{tr "Machine type"}}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<hr class="not_firecracker">
|
||||
<div class="row">
|
||||
<div class="medium-4 columns only_kvm not_lxd">
|
||||
<label>
|
||||
@ -88,7 +88,7 @@
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="row not_firecracker">
|
||||
<div class="large-12 columns only_kvm not_lxd">
|
||||
<label>
|
||||
{{tr "Path to the bootloader executable"}}
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<fieldset class="hypervisor only_kvm">
|
||||
<fieldset class="hypervisor only_kvm not_firecracker">
|
||||
<legend>{{tr "RAW data"}}</legend>
|
||||
<div >
|
||||
<div class="medium-4 columns">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="row">
|
||||
<div class="medium-6 columns hypervisor only_kvm">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_firecracker">
|
||||
<label for="TARGET">
|
||||
<span class="hypervisor only_kvm"> {{tr "Target device"}} </span>
|
||||
<span class="hypervisor only_lxd"> {{tr "Mountpoint"}} </span>
|
||||
@ -7,7 +7,7 @@
|
||||
</label>
|
||||
<input type="text" wizard_field="TARGET" id="TARGET" name="target" placeholder="sdc"/>
|
||||
</div>
|
||||
<div class="medium-6 columns hypervisor only_kvm">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_firecracker">
|
||||
<label for="DRIVER">
|
||||
{{tr "Image mapping driver"}}
|
||||
</label>
|
||||
@ -22,7 +22,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd not_firecracker">
|
||||
<label>
|
||||
{{tr "BUS"}}
|
||||
<select id="disk_dev_prefix" name="disk_dev_prefix">
|
||||
@ -47,7 +47,7 @@
|
||||
<option value="no">{{tr "no"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-6 columns hypervisor only_vcenter">
|
||||
<div class="medium-6 columns hypervisor only_vcenter not_firecracker">
|
||||
<label for="vcenter_adapter_type">
|
||||
{{tr "Bus adapter controller"}}
|
||||
</label>
|
||||
@ -59,7 +59,7 @@
|
||||
<option value="custom">custom</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-6 columns only_vcenter">
|
||||
<div class="medium-6 columns only_vcenter not_firecracker">
|
||||
<label for="vcenter_disk_type">
|
||||
{{tr "Disk provisioning type"}}
|
||||
</label>
|
||||
@ -73,7 +73,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row vm_param">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd not_firecracker">
|
||||
<label for="CACHE">
|
||||
{{tr "Cache"}}
|
||||
</label>
|
||||
@ -87,7 +87,7 @@
|
||||
<option value="unsafe">unsafe</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd not_firecracker">
|
||||
<label for="IO">
|
||||
{{tr "IO policy"}}
|
||||
</label>
|
||||
@ -97,7 +97,7 @@
|
||||
<option value="native">native</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd">
|
||||
<div class="medium-6 columns hypervisor only_kvm not_lxd not_firecracker">
|
||||
<label for="DISCARD">
|
||||
{{tr "Discard"}}
|
||||
</label>
|
||||
@ -127,7 +127,7 @@
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
<fieldset>
|
||||
<fieldset class="not_firecracker">
|
||||
<legend>{{tr "Throttling (Bytes/s)"}}</legend>
|
||||
<div class="row vm_param">
|
||||
<div class="medium-4 columns hypervisor only_kvm">
|
||||
@ -183,7 +183,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<fieldset class="not_firecracker">
|
||||
<legend>{{tr "Throttling (IOPS)"}}</legend>
|
||||
<div class="row vm_param">
|
||||
<div class="medium-4 columns hypervisor only_kvm">
|
||||
|
Loading…
Reference in New Issue
Block a user