mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Feature #4320: Fix labels removing duplicated IDs
This commit is contained in:
parent
dca4a79b16
commit
617b79ea07
@ -108,19 +108,19 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
|
||||
context.on("change", "select#vcenter_customizations", function(){
|
||||
context.on("change", "select.vcenter_customizations", function(){
|
||||
var option = $("option:selected", this);
|
||||
|
||||
if (option.attr("custom") == "true"){
|
||||
$('input#vcenter_customizations_value', context).show();
|
||||
$('input.vcenter_customizations_value', context).show();
|
||||
} else {
|
||||
$('input#vcenter_customizations_value', context).hide();
|
||||
$('input.vcenter_customizations_value', context).hide();
|
||||
}
|
||||
|
||||
$('input#vcenter_customizations_value', context).val( $(this).val() );
|
||||
$('input.vcenter_customizations_value', context).val( $(this).val() );
|
||||
});
|
||||
|
||||
$('input#vcenter_customizations_value', context).hide();
|
||||
$('input.vcenter_customizations_value', context).hide();
|
||||
|
||||
OpenNebulaHost.vcenterCustomizations({
|
||||
data : {},
|
||||
@ -136,14 +136,14 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
|
||||
context.on("change", "input#vcenter_customizations_value", function(){
|
||||
context.on("change", "input.vcenter_customizations_value", function(){
|
||||
var opt =
|
||||
$('option'+
|
||||
'[value="'+$('input#vcenter_customizations_value', context).val()+'"]', context);
|
||||
'[value="'+$('input.vcenter_customizations_value', context).val()+'"]', context);
|
||||
|
||||
if (opt.size() == 0){
|
||||
opt = $('option[custom="true"]', context);
|
||||
$('input#vcenter_customizations_value', context).show();
|
||||
$('input.vcenter_customizations_value', context).show();
|
||||
}
|
||||
|
||||
opt.attr('selected', 'selected');
|
||||
@ -180,14 +180,14 @@ define(function(require) {
|
||||
|
||||
html += '</select>';
|
||||
|
||||
$("#vcenter_customizations", context).html(html);
|
||||
$(".vcenter_customizations", context).html(html);
|
||||
}
|
||||
|
||||
function _retrieve(context) {
|
||||
var templateJSON = {};
|
||||
|
||||
if($("input[name='context_type']:checked", context).val() == "context_type_vcenter"){
|
||||
var customization = $('input#vcenter_customizations_value', context).val();
|
||||
var customization = $('input.vcenter_customizations_value', context).val();
|
||||
|
||||
if (customization) {
|
||||
templateJSON["VCENTER_PUBLIC_CLOUD"] = {
|
||||
@ -198,7 +198,7 @@ define(function(require) {
|
||||
var contextJSON = WizardFields.retrieve(context);
|
||||
$.extend(contextJSON, CustomTagsTable.retrieve(context));
|
||||
|
||||
if ($("#ssh_context", context).is(":checked")) {
|
||||
if ($(".ssh_context", context).is(":checked")) {
|
||||
var public_key = $("#ssh_public_key", context).val();
|
||||
if (public_key) {
|
||||
contextJSON["SSH_PUBLIC_KEY"] = TemplateUtils.escapeDoubleQuotes(public_key);
|
||||
@ -207,11 +207,11 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($("#network_context", context).is(":checked")) {
|
||||
if ($(".network_context", context).is(":checked")) {
|
||||
contextJSON["NETWORK"] = "YES";
|
||||
}
|
||||
|
||||
if ($("#token_context", context).is(":checked")) {
|
||||
if ($(".token_context", context).is(":checked")) {
|
||||
contextJSON["TOKEN"] = "YES";
|
||||
}
|
||||
|
||||
@ -222,9 +222,9 @@ define(function(require) {
|
||||
contextJSON[name] = "$" + name;
|
||||
});
|
||||
|
||||
var start_script = $("#START_SCRIPT", context).val();
|
||||
var start_script = $(".START_SCRIPT", context).val();
|
||||
if (start_script != "") {
|
||||
if ($("#ENCODE_START_SCRIPT", context).is(":checked")) {
|
||||
if ($(".ENCODE_START_SCRIPT", context).is(":checked")) {
|
||||
contextJSON["START_SCRIPT_BASE64"] = btoa(start_script);
|
||||
} else {
|
||||
contextJSON["START_SCRIPT"] = start_script;
|
||||
@ -255,7 +255,7 @@ define(function(require) {
|
||||
$("input#context_type_vcenter", context).click();
|
||||
|
||||
if(this["CUSTOMIZATION_SPEC"]){
|
||||
$('input#vcenter_customizations_value', context).val(this["CUSTOMIZATION_SPEC"]).change();
|
||||
$('input.vcenter_customizations_value', context).val(this["CUSTOMIZATION_SPEC"]).change();
|
||||
} else if(userInputsJSON || contextJSON) {
|
||||
$("input#context_type_opennebula", context).click();
|
||||
}
|
||||
@ -265,8 +265,8 @@ define(function(require) {
|
||||
});
|
||||
}
|
||||
|
||||
$("#ssh_context", context).removeAttr('checked');
|
||||
$("#network_context", context).removeAttr('checked');
|
||||
$(".ssh_context", context).removeAttr('checked');
|
||||
$(".network_context", context).removeAttr('checked');
|
||||
|
||||
if (userInputsJSON) {
|
||||
UserInputs.fill(context, templateJSON);
|
||||
@ -293,19 +293,19 @@ define(function(require) {
|
||||
var customTagsJSON = {};
|
||||
$.each(contextJSON, function(key, value) {
|
||||
if (ssh_regexp.test(key)) {
|
||||
$("#ssh_context", context).prop('checked', 'checked');
|
||||
$(".ssh_context", context).prop('checked', 'checked');
|
||||
|
||||
if (!publickey_regexp.test(value)) {
|
||||
$("#ssh_public_key", context).val(TemplateUtils.htmlDecode(value));
|
||||
}
|
||||
} else if (token_regexp.test(key)) {
|
||||
$("#token_context", context).prop('checked', 'checked');
|
||||
$(".token_context", context).prop('checked', 'checked');
|
||||
} else if (net_regexp.test(key)) {
|
||||
$("#network_context", context).prop('checked', 'checked');
|
||||
$(".network_context", context).prop('checked', 'checked');
|
||||
} else if ("INIT_SCRIPTS" == key) {
|
||||
$("input#INIT_SCRIPTS").val(TemplateUtils.htmlDecode(value));
|
||||
$("input.INIT_SCRIPTS").val(TemplateUtils.htmlDecode(value));
|
||||
} else if ("FILES_DS" == key) {
|
||||
$('#FILES_DS', context).val(TemplateUtils.escapeDoubleQuotes(TemplateUtils.htmlDecode(contextJSON["FILES_DS"])))
|
||||
$('.FILES_DS', context).val(TemplateUtils.escapeDoubleQuotes(TemplateUtils.htmlDecode(contextJSON["FILES_DS"])))
|
||||
var files = [];
|
||||
while (match = file_ds_regexp.exec(value)) {
|
||||
files.push(match[1])
|
||||
@ -316,10 +316,10 @@ define(function(require) {
|
||||
}
|
||||
that.contextFilesTable.selectResourceTableSelect(selectedResources);
|
||||
} else if ("START_SCRIPT_BASE64" == key) {
|
||||
$("#ENCODE_START_SCRIPT", context).prop('checked', 'checked');
|
||||
$("#START_SCRIPT", context).val(atob(value));
|
||||
$(".ENCODE_START_SCRIPT", context).prop('checked', 'checked');
|
||||
$(".START_SCRIPT", context).val(atob(value));
|
||||
} else if ("START_SCRIPT" == key) {
|
||||
$("#START_SCRIPT", context).val(TemplateUtils.escapeDoubleQuotes(TemplateUtils.htmlDecode(value)));
|
||||
$(".START_SCRIPT", context).val(TemplateUtils.escapeDoubleQuotes(TemplateUtils.htmlDecode(value)));
|
||||
} else {
|
||||
customTagsJSON[key] = value;
|
||||
}
|
||||
@ -339,6 +339,6 @@ define(function(require) {
|
||||
req_string.push("$FILE[IMAGE_ID="+ fileId +"]");
|
||||
});
|
||||
|
||||
$('#FILES_DS', context).val(req_string.join(" "));
|
||||
$('.FILES_DS', context).val(req_string.join(" "));
|
||||
};
|
||||
});
|
||||
|
@ -25,12 +25,15 @@
|
||||
</div>
|
||||
<div class="row hypervisor only_vcenter context_type context_type_vcenter" hidden>
|
||||
<div class="columns medium-6">
|
||||
<label for="vcenter_customizations">{{tr "vCenter customizations"}}:</label>
|
||||
<select id="vcenter_customizations"/>
|
||||
<label>
|
||||
{{tr "vCenter customizations"}}:
|
||||
<select class="vcenter_customizations"/>
|
||||
</label>
|
||||
</div>
|
||||
<div class="columns medium-6">
|
||||
<label> </label>
|
||||
<input id="vcenter_customizations_value" type="text"></div>
|
||||
<input class="vcenter_customizations_value" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="context_type context_type_opennebula row collapse">
|
||||
<div class="medium-2 columns">
|
||||
@ -53,8 +56,8 @@
|
||||
<div class="columns medium-6">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<input type="checkbox" name="ssh_context" id="ssh_context" checked>
|
||||
<label for="ssh_context">
|
||||
<input type="checkbox" class="ssh_context" id="ssh_context{{uniqueId}}" checked>
|
||||
<label for="ssh_context{{uniqueId}}">
|
||||
{{tr " Add SSH contextualization"}}
|
||||
{{{tip (tr "Add an ssh public key to the context. If the Public Key textarea is empty then the user variable SSH_PUBLIC_KEY will be used.")}}}
|
||||
</label>
|
||||
@ -62,16 +65,18 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="ssh_public_key">{{tr "Public Key"}}:</label>
|
||||
<textarea rows="2" type="text" id="ssh_public_key" name="ssh_public_key" />
|
||||
<label>
|
||||
{{tr "Public Key"}}:
|
||||
<textarea rows="2" type="text" id="ssh_public_key" name="ssh_public_key" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns medium-6">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<input type="checkbox" name="network_context" id="network_context" checked>
|
||||
<label for="network_context">
|
||||
<input type="checkbox" class="network_context" id="network_context{{uniqueId}}" checked>
|
||||
<label for="network_context{{uniqueId}}">
|
||||
{{tr " Add Network contextualization"}}
|
||||
{{{tip (tr "Add network contextualization parameters. For each NIC defined in the NETWORK section, ETH$i_IP, ETH$i_NETWORK... parameters will be included in the CONTEXT section and will be available in the Virtual Machine")}}}
|
||||
</label>
|
||||
@ -79,8 +84,8 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<input type="checkbox" name="token_context" id="token_context">
|
||||
<label for="token_context">
|
||||
<input type="checkbox" class="token_context" id="token_context{{uniqueId}}">
|
||||
<label for="token_context{{uniqueId}}">
|
||||
{{tr " Add OneGate token"}}
|
||||
{{{tip (tr "Add a file (token.txt) to the context contaning the token to push custom metrics to the VirtualMachine through OneGate")}}}
|
||||
</label>
|
||||
@ -90,13 +95,13 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="START_SCRIPT">
|
||||
<label>
|
||||
{{tr "Start Script"}}
|
||||
{{{tip (tr "Text of the script executed when the machine starts up. It can contain shebang in case it is not shell script. For example 'yum upgrade'")}}}
|
||||
{{{tip (tr "Text of the script executed when the machine starts up. It can contain shebang in case it is not shell script. For example 'yum upgrade'")}}}
|
||||
<textarea rows="4" type="text" class="START_SCRIPT"/>
|
||||
</label>
|
||||
<textarea rows="4" type="text" id="START_SCRIPT" name="START_SCRIPT" />
|
||||
<input type="checkbox" name="ENCODE_START_SCRIPT" id="ENCODE_START_SCRIPT">
|
||||
<label for="ENCODE_START_SCRIPT">{{tr " Encode Script in Base64"}}</label>
|
||||
<input type="checkbox" class="ENCODE_START_SCRIPT" id="ENCODE_START_SCRIPT{{uniqueId}}">
|
||||
<label for="ENCODE_START_SCRIPT{{uniqueId}}">{{tr " Encode Script in Base64"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
@ -116,20 +121,20 @@
|
||||
{{{contextFilesTableHTML}}}
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="FILES_DS">
|
||||
<label>
|
||||
{{tr "FILES_DS"}}
|
||||
{{{tip (tr "Raw String for the FILE_DS attribute of the VM template, representing files that will be included in the contextualization image. Each file must be stored in a FILE_DS Datastore and must be of type CONTEXT")}}}
|
||||
{{{tip (tr "Raw String for the FILE_DS attribute of the VM template, representing files that will be included in the contextualization image. Each file must be stored in a FILE_DS Datastore and must be of type CONTEXT")}}}
|
||||
<input type="text" wizard_field="FILES_DS" class="FILES_DS" />
|
||||
</label>
|
||||
<input type="text" wizard_field="FILES_DS" id="FILES_DS" name="FILES_DS" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="INIT_SCRIPTS">
|
||||
<label>
|
||||
{{tr "Init scripts"}}
|
||||
{{{tip (tr "If the VM uses the OpenNebula contextualization package the init.sh file is executed by default. When the init script added is not called init.sh or more than one init script is added, this list contains the scripts to run and the order. Ex. “init.sh users.sh mysql.sh”")}}}
|
||||
{{{tip (tr "If the VM uses the OpenNebula contextualization package the init.sh file is executed by default. When the init script added is not called init.sh or more than one init script is added, this list contains the scripts to run and the order. Ex. “init.sh users.sh mysql.sh”")}}}
|
||||
<input type="text" wizard_field="INIT_SCRIPTS" class="INIT_SCRIPTS"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="INIT_SCRIPTS" id="INIT_SCRIPTS" name="INIT_SCRIPTS" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -66,7 +66,7 @@ define(function(require) {
|
||||
*/
|
||||
|
||||
function _html() {
|
||||
return TemplateHTML();
|
||||
return TemplateHTML({'uniqueId': UniqueId.id()});
|
||||
}
|
||||
|
||||
function _onShow(context, panelForm) {
|
||||
@ -76,9 +76,9 @@ define(function(require) {
|
||||
$("input[name='graphics_type']", context).change(function() {
|
||||
$("#TYPE", context).val($(this).attr("value"));
|
||||
if ($(this).attr("value") !== '') {
|
||||
$("#LISTEN", context).val("0.0.0.0");
|
||||
$('input[wizard_field="LISTEN"]', context).val("0.0.0.0");
|
||||
} else {
|
||||
$("#LISTEN", context).val('');
|
||||
$('input[wizard_field="LISTEN"]', context).val('');
|
||||
}
|
||||
});
|
||||
|
||||
@ -117,7 +117,7 @@ define(function(require) {
|
||||
var templateJSON = {};
|
||||
var graphicsJSON = WizardFields.retrieve(context);
|
||||
|
||||
if (!$.isEmptyObject(graphicsJSON) && $("#RANDOM_PASSWD:checked", context).length > 0) {
|
||||
if (!$.isEmptyObject(graphicsJSON) && $(".RANDOM_PASSWD:checked", context).length > 0) {
|
||||
graphicsJSON["RANDOM_PASSWD"] = "YES";
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ define(function(require) {
|
||||
}
|
||||
|
||||
if (graphicsJSON["RANDOM_PASSWD"] == "YES") {
|
||||
$("#RANDOM_PASSWD", context).attr("checked", "checked");
|
||||
$(".RANDOM_PASSWD", context).attr("checked", "checked");
|
||||
}
|
||||
|
||||
WizardFields.fill(context, graphicsJSON);
|
||||
|
@ -20,56 +20,56 @@
|
||||
<legend>{{tr "Graphics"}}</legend>
|
||||
<div class="">
|
||||
<div class="large-12 columns text-center">
|
||||
<input type="radio" name="graphics_type" ID="radioNoneType" value="">
|
||||
<label for="radioNoneType">{{tr "None"}}</label>
|
||||
<input type="radio" name="graphics_type" ID="radioVncType" value="VNC">
|
||||
<label for="radioVncType">VNC</label>
|
||||
<input type="radio" name="graphics_type" ID="radioSdlType" value="SDL" class="hypervisor only_kvm" >
|
||||
<label class="hypervisor only_kvm" for="radioSdlType">SDL</label>
|
||||
<input type="radio" name="graphics_type" ID="radioSpiceType" value="SPICE" class="hypervisor only_kvm" >
|
||||
<label class="hypervisor only_kvm" for="radioSpiceType">SPICE</label>
|
||||
<input type="radio" name="graphics_type" ID="radioNoneType{{uniqueId}}" value="" checked>
|
||||
<label for="radioNoneType{{uniqueId}}">{{tr "None"}}</label>
|
||||
<input type="radio" name="graphics_type" ID="radioVncType{{uniqueId}}" value="VNC">
|
||||
<label for="radioVncType{{uniqueId}}">VNC</label>
|
||||
<input type="radio" name="graphics_type" ID="radioSdlType{{uniqueId}}" value="SDL" class="hypervisor only_kvm" >
|
||||
<label class="hypervisor only_kvm" for="radioSdlType{{uniqueId}}">SDL</label>
|
||||
<input type="radio" name="graphics_type" ID="radioSpiceType{{uniqueId}}" value="SPICE" class="hypervisor only_kvm" >
|
||||
<label class="hypervisor only_kvm" for="radioSpiceType{{uniqueId}}">SPICE</label>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="">
|
||||
<input type="hidden" wizard_field="TYPE" name="graphics_type" ID="TYPE">
|
||||
<div class="large-12 columns">
|
||||
<label for="LISTEN">
|
||||
<label>
|
||||
{{tr "Listen IP"}}
|
||||
{{{tip (tr "IP to listen on")}}}
|
||||
<input type="text" wizard_field="LISTEN"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="LISTEN" id="LISTEN" name="graphics_ip" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="medium-6 columns">
|
||||
<label for="PORT">
|
||||
<label>
|
||||
{{tr "Port"}}
|
||||
{{{tip (tr "Port for the VNC/SPICE server")}}}
|
||||
<input type="text" wizard_field="PORT"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="PORT" id="PORT" name="port" />
|
||||
</div>
|
||||
<div class="medium-6 columns">
|
||||
<label for="KEYMAP">
|
||||
<label>
|
||||
{{tr "Keymap"}}
|
||||
{{{tip (tr "Keyboard configuration locale to use in the VNC/SPICE display")}}}
|
||||
<input type="text" wizard_field="KEYMAP"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="KEYMAP" id="KEYMAP" name="keymap" />
|
||||
</div>
|
||||
</div>
|
||||
<div class=" hypervisor only_kvm">
|
||||
<div class="large-12 columns">
|
||||
<label for="PASSWD">
|
||||
<label>
|
||||
{{tr "Password"}}
|
||||
{{{tip (tr "Password for the VNC/SPICE server")}}}
|
||||
<input type="text" wizard_field="PASSWD"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="PASSWD" id="PASSWD" name="graphics_pw" />
|
||||
</div>
|
||||
</div>
|
||||
<div class=" hypervisor only_kvm">
|
||||
<div class="columns large-12">
|
||||
<input type="checkbox" name="RANDOM_PASSWD" id="RANDOM_PASSWD">
|
||||
<label for="RANDOM_PASSWD">
|
||||
<input type="checkbox" class="RANDOM_PASSWD" id="RANDOM_PASSWD{{uniqueId}}">
|
||||
<label for="RANDOM_PASSWD{{uniqueId}}">
|
||||
{{tr "Generate Random Password"}}
|
||||
{{{tip (tr "A random password will be generated for each VM, and will be included in the VM information")}}}
|
||||
</label>
|
||||
@ -83,14 +83,14 @@
|
||||
<div class="">
|
||||
<div class="medium-5 columns">
|
||||
<select id="INPUT_TYPE" name="input_type">
|
||||
<option id="no_type" name="no_type" value=""></option>
|
||||
<option value=""></option>
|
||||
<option value="mouse">{{tr "Mouse"}}</option>
|
||||
<option value="tablet">{{tr "Tablet"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-4 columns">
|
||||
<select id="INPUT_BUS" name="input_bus">
|
||||
<option id="no_input" name="no_input" value=""></option>
|
||||
<option value=""></option>
|
||||
<option value="usb">{{tr "USB"}}</option>
|
||||
<option value="ps2">{{tr "PS2"}}</option>
|
||||
</select>
|
||||
|
@ -278,11 +278,11 @@ define(function(require) {
|
||||
if (osJSON) {
|
||||
|
||||
if (osJSON['KERNEL_DS'] == undefined && osJSON['KERNEL'] != undefined){
|
||||
$('input#radioKernelPath', context).click();
|
||||
$('input[value="kernel_path"]', context).click();
|
||||
}
|
||||
|
||||
if (osJSON['INITRD_DS'] == undefined && osJSON['INITRD'] != undefined){
|
||||
$('input#radioInitrdPath', context).click();
|
||||
$('input[value="initrd_path"]', context).click();
|
||||
}
|
||||
|
||||
WizardFields.fill(context, osJSON);
|
||||
|
@ -35,101 +35,101 @@
|
||||
<div class="wizard_internal_tab is-active tabs-panel bootTab" id="bootTab{{uniqueId}}">
|
||||
<div class="row">
|
||||
<div class="medium-4 columns">
|
||||
<label for="ARCH">
|
||||
<label>
|
||||
{{tr "Arch"}}
|
||||
{{{tip (tr "CPU architecture to virtualization")}}}
|
||||
{{{tip (tr "CPU architecture to virtualization")}}}
|
||||
<select wizard_field="ARCH">
|
||||
<option value=""></option>
|
||||
<option value="i686">i686</option>
|
||||
<option value="x86_64">x86_64</option>
|
||||
</select>
|
||||
</label>
|
||||
<select wizard_field="ARCH" id="ARCH" name="arch">
|
||||
<option id="no_arch" name="no_arch" value=""></option>
|
||||
<option value="i686">i686</option>
|
||||
<option value="x86_64">x86_64</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-8 columns hypervisor only_kvm">
|
||||
<label for="MACHINE">
|
||||
<label>
|
||||
{{tr "Machine type"}}
|
||||
{{{tip (tr "libvirt machine type, only for KVM")}}}
|
||||
{{{tip (tr "libvirt machine type, only for KVM")}}}
|
||||
<input type="text" wizard_field="MACHINE"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="MACHINE" id="MACHINE" name="machine" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="medium-4 columns">
|
||||
<label for="ROOT">
|
||||
<label>
|
||||
{{tr "Root"}}
|
||||
{{{tip (tr "Device to be mounted as root")}}}
|
||||
{{{tip (tr "Device to be mounted as root")}}}
|
||||
<input type="text" wizard_field="ROOT"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="ROOT" id="ROOT" name="root"/>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="medium-4 columns">
|
||||
<label for="BOOT_0">
|
||||
<label>
|
||||
{{tr "1st Boot"}}
|
||||
{{{tip (tr "1st Boot device type")}}}
|
||||
{{{tip (tr "1st Boot device type")}}}
|
||||
<select id="BOOT_0" name="boot">
|
||||
<option value=""></option>
|
||||
<option value="hd">{{tr "HD"}}</option>
|
||||
<option value="fd">{{tr "FD"}}</option>
|
||||
<option value="cdrom">{{tr "CDROM"}}</option>
|
||||
<option value="network">{{tr "NETWORK"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select id="BOOT_0" name="boot">
|
||||
<option id="no_boot" name="no_boot" value=""></option>
|
||||
<option value="hd">{{tr "HD"}}</option>
|
||||
<option value="fd">{{tr "FD"}}</option>
|
||||
<option value="cdrom">{{tr "CDROM"}}</option>
|
||||
<option value="network">{{tr "NETWORK"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-4 columns">
|
||||
<label for="BOOT_1">
|
||||
<label>
|
||||
{{tr "2nd Boot"}}
|
||||
{{{tip (tr "2nd Boot device type")}}}
|
||||
{{{tip (tr "2nd Boot device type")}}}
|
||||
<select id="BOOT_1" name="boot">
|
||||
<option value=""></option>
|
||||
<option value="hd">{{tr "HD"}}</option>
|
||||
<option value="fd">{{tr "FD"}}</option>
|
||||
<option value="cdrom">{{tr "CDROM"}}</option>
|
||||
<option value="network">{{tr "NETWORK"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select id="BOOT_1" name="boot">
|
||||
<option id="no_boot" name="no_boot" value=""></option>
|
||||
<option value="hd">{{tr "HD"}}</option>
|
||||
<option value="fd">{{tr "FD"}}</option>
|
||||
<option value="cdrom">{{tr "CDROM"}}</option>
|
||||
<option value="network">{{tr "NETWORK"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-4 columns">
|
||||
<label for="BOOT_2">
|
||||
<label>
|
||||
{{tr "3rd Boot"}}
|
||||
{{{tip (tr "3rd Boot device type")}}}
|
||||
{{{tip (tr "3rd Boot device type")}}}
|
||||
<select id="BOOT_2" name="boot">
|
||||
<option value=""></option>
|
||||
<option value="hd">{{tr "HD"}}</option>
|
||||
<option value="fd">{{tr "FD"}}</option>
|
||||
<option value="cdrom">{{tr "CDROM"}}</option>
|
||||
<option value="network">{{tr "NETWORK"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select id="BOOT_2" name="boot">
|
||||
<option id="no_boot" name="no_boot" value=""></option>
|
||||
<option value="hd">{{tr "HD"}}</option>
|
||||
<option value="fd">{{tr "FD"}}</option>
|
||||
<option value="cdrom">{{tr "CDROM"}}</option>
|
||||
<option value="network">{{tr "NETWORK"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="KERNEL_CMD">
|
||||
<label>
|
||||
{{tr "Kernel cmd"}}
|
||||
{{{tip (tr "Arguments for the booting kernel")}}}
|
||||
{{{tip (tr "Arguments for the booting kernel")}}}
|
||||
<input type="text" wizard_field="KERNEL_CMD"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="KERNEL_CMD" id="KERNEL_CMD" name="kernel_cmd" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="BOOTLOADER">
|
||||
<label>
|
||||
{{tr "Bootloader"}}
|
||||
{{{tip (tr "Path to the bootloader executable")}}}
|
||||
{{{tip (tr "Path to the bootloader executable")}}}
|
||||
<input type="text" wizard_field="BOOTLOADER"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="BOOTLOADER" id="BOOTLOADER" name="bootloader" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="kernelTab{{uniqueId}}" class="wizard_internal_tab tabs-panel kernelTab">
|
||||
<div class="row">
|
||||
<div class="large-12 columns text-center">
|
||||
<input id="radioKernelDs" type="radio" name="kernel_type" value="kernel_ds" checked/>
|
||||
<label for="radioKernelDs">{{tr "Registered Image"}}</label>
|
||||
<input id="radioKernelPath" type="radio" name="kernel_type" value="kernel_path"/>
|
||||
<label for="radioKernelPath">{{tr "Remote PATH"}}</label>
|
||||
<input id="radioKernelDs{{uniqueId}}" type="radio" name="kernel_type" value="kernel_ds" checked/>
|
||||
<label for="radioKernelDs{{uniqueId}}">{{tr "Registered Image"}}</label>
|
||||
<input id="radioKernelPath{{uniqueId}}" type="radio" name="kernel_type" value="kernel_path"/>
|
||||
<label for="radioKernelPath{{uniqueId}}">{{tr "Remote path"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
@ -137,28 +137,30 @@
|
||||
{{{kernelFilesTableHTML}}}
|
||||
<div id="kernel_ds_inputs" class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="KERNEL_DS">{{tr "KERNEL_DS"}}</label>
|
||||
<input type="text" wizard_field="KERNEL_DS" id="KERNEL_DS" name="KERNEL_DS"/>
|
||||
<label>
|
||||
{{tr "KERNEL_DS"}}
|
||||
<input type="text" wizard_field="KERNEL_DS" id="KERNEL_DS" name="KERNEL_DS"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="kernel_path_inputs" class="kernel_path row" hidden>
|
||||
<div class="large-12 columns">
|
||||
<label for="KERNEL">
|
||||
{{tr "PATH"}}
|
||||
{{{tip (tr "Path to the OS kernel to boot the image")}}}
|
||||
<label>
|
||||
{{tr "Path"}}
|
||||
{{{tip (tr "Path to the OS kernel to boot the image")}}}
|
||||
<input type="text" wizard_field="KERNEL"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="KERNEL" id="KERNEL" name="kernel" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ramdiskTab{{uniqueId}}" class="wizard_internal_tab tabs-panel ramdiskTab">
|
||||
<div class="row">
|
||||
<div class="large-12 columns text-center">
|
||||
<input id="radioInintrdDs" type="radio" name="initrd_type" value="initrd_ds" checked>
|
||||
<label for="radioInintrdDs">{{tr "Registered Image "}}</label>
|
||||
<input id="radioInitrdPath" type="radio" name="initrd_type" value="initrd_path">
|
||||
<label for="radioInitrdPath">{{tr "Remote PATH"}}</label>
|
||||
<input id="radioInintrdDs{{uniqueId}}" type="radio" name="initrd_type" value="initrd_ds" checked>
|
||||
<label for="radioInintrdDs{{uniqueId}}">{{tr "Registered Image "}}</label>
|
||||
<input id="radioInitrdPath{{uniqueId}}" type="radio" name="initrd_type" value="initrd_path">
|
||||
<label for="radioInitrdPath{{uniqueId}}">{{tr "Remote path"}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
@ -166,19 +168,21 @@
|
||||
{{{initrdFilesTableHTML}}}
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="INITRD_DS">{{tr "INITRD_DS"}}</label>
|
||||
<input type="text" wizard_field="INITRD_DS" id="INITRD_DS" name="initrd_id"/>
|
||||
<label>
|
||||
{{tr "INITRD_DS"}}
|
||||
<input type="text" wizard_field="INITRD_DS" id="INITRD_DS" name="initrd_id"/>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="initrd_path_inputs" class="initrd_path" hidden>
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<label for="INITRD">
|
||||
{{tr "PATH"}}
|
||||
{{{tip (tr "Path to the initrd image")}}}
|
||||
<label>
|
||||
{{tr "Path"}}
|
||||
{{{tip (tr "Path to the initrd image")}}}
|
||||
<input type="text" wizard_field="INITRD"/>
|
||||
</label>
|
||||
<input type="text" wizard_field="INITRD" id="INITRD" name="initrd"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -186,63 +190,63 @@
|
||||
<div class="wizard_internal_tab tabs-panel featuresTab" id="featuresTab{{uniqueId}}">
|
||||
<div class="row">
|
||||
<div class="medium-6 columns">
|
||||
<label for="ACPI">
|
||||
<label>
|
||||
{{tr "ACPI"}}
|
||||
{{{tip (tr "Add support in the VM for Advanced Configuration and Power Interface (ACPI)")}}}
|
||||
{{{tip (tr "Add support in the VM for Advanced Configuration and Power Interface (ACPI)")}}}
|
||||
<select wizard_field="ACPI">
|
||||
<option value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select wizard_field="ACPI" id="ACPI" name="acpi">
|
||||
<option id="no_apci" name="no_apci" value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-6 columns">
|
||||
<label for="PAE">
|
||||
<label>
|
||||
{{tr "PAE"}}
|
||||
{{{tip (tr "Add support in the VM for Physical Address Extension (PAE)")}}}
|
||||
{{{tip (tr "Add support in the VM for Physical Address Extension (PAE)")}}}
|
||||
<select wizard_field="PAE">
|
||||
<option value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select wizard_field="PAE" id="PAE" name="pae">
|
||||
<option id="no_pae" name="no_pae" value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="medium-6 columns">
|
||||
<label for="APIC">
|
||||
<label>
|
||||
{{tr "APIC"}}
|
||||
{{{tip (tr "Enables the advanced programmable IRQ management.")}}}
|
||||
{{{tip (tr "Enables the advanced programmable IRQ management.")}}}
|
||||
<select wizard_field="APIC">
|
||||
<option value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select wizard_field="APIC" id="APIC" name="apic">
|
||||
<option id="no_apic" name="no_apic" value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="medium-6 columns">
|
||||
<label for="HYPERV">
|
||||
<label>
|
||||
{{tr "HYPERV"}}
|
||||
{{{tip (tr "Add support in the VM for hyper-v features (HYPERV)")}}}
|
||||
{{{tip (tr "Add support in the VM for hyper-v features (HYPERV)")}}}
|
||||
<select wizard_field="HYPERV">
|
||||
<option value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select wizard_field="HYPERV" id="HYPERV" name="hyperv">
|
||||
<option id="no_hyperv" name="no_hyperv" value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="medium-6 columns">
|
||||
<label for="LOCALTIME">
|
||||
<label>
|
||||
{{tr "Localtime"}}
|
||||
{{{tip (tr "The guest clock will be synchronized to the hosts configured timezone when booted.")}}}
|
||||
{{{tip (tr "The guest clock will be synchronized to the hosts configured timezone when booted.")}}}
|
||||
<select wizard_field="LOCALTIME">
|
||||
<option value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
<select wizard_field="LOCALTIME" id="LOCALTIME" name="localtime">
|
||||
<option id="no_localtime" name="no_localtime" value=""></option>
|
||||
<option value="yes">{{tr "Yes"}}</option>
|
||||
<option value="no">{{tr "No"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -147,11 +147,11 @@ define(function(require) {
|
||||
var templateJSON = CustomTagsTable.retrieve(context);
|
||||
|
||||
var rawJSON = {}
|
||||
var rawData = TemplateUtils.escapeDoubleQuotes($('#raw_data', context).val());
|
||||
var rawData = TemplateUtils.escapeDoubleQuotes($('.raw_data', context).val());
|
||||
if (rawData != "") {
|
||||
rawJSON['DATA'] = rawData;
|
||||
|
||||
var rawType = $('#raw_type', context).val();
|
||||
var rawType = $('.raw_type', context).val();
|
||||
if (rawType != undefined) {
|
||||
rawJSON['TYPE'] = rawType;
|
||||
}
|
||||
@ -177,10 +177,9 @@ define(function(require) {
|
||||
function _fill(context, templateJSON) {
|
||||
var rawJSON = templateJSON.RAW;
|
||||
if (rawJSON) {
|
||||
$('#raw_type', context).val(rawJSON['TYPE']);
|
||||
$('#raw_type', context).change();
|
||||
$('#raw_data', context).val(TemplateUtils.htmlDecode(rawJSON['DATA']));
|
||||
$('#raw_data_vmx', context).val(TemplateUtils.htmlDecode(rawJSON['DATA_VMX']));
|
||||
$('.raw_type', context).val(rawJSON['TYPE']);
|
||||
$('.raw_type', context).change();
|
||||
$('.raw_data', context).val(TemplateUtils.htmlDecode(rawJSON['DATA']));
|
||||
|
||||
delete templateJSON.RAW
|
||||
}
|
||||
|
@ -14,29 +14,31 @@
|
||||
{{! limitations under the License. }}
|
||||
{{! -------------------------------------------------------------------------- }}
|
||||
|
||||
<div class="">
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<fieldset class="hypervisor only_kvm">
|
||||
<legend>{{tr "RAW data"}}</legend>
|
||||
<div >
|
||||
<div class="medium-4 columns">
|
||||
<label for="raw_type">{{tr "TYPE"}}</label>
|
||||
<select id="raw_type" name="raw_type" disabled>
|
||||
<option value="kvm">{{tr "kvm"}}</option>
|
||||
</select>
|
||||
<label>
|
||||
{{tr "Type"}}
|
||||
<select class="raw_type" disabled>
|
||||
<option value="kvm">{{tr "kvm"}}</option>
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div class="medium-8 columns">
|
||||
<label class="" for="raw_data">
|
||||
{{tr "DATA"}}
|
||||
<label>
|
||||
{{tr "Data"}}
|
||||
{{{tip (tr "Raw data to be passed directly to the hypervisor")}}}
|
||||
<textarea rows="2" type="text" class="raw_data"/>
|
||||
</label>
|
||||
<textarea rows="2" type="text" id="raw_data" name="raw_data" />
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="hypervisor only_kvm vm_updateconf_hide">
|
||||
<legend>{{tr "PCI Devices"}}</legend>
|
||||
<div >
|
||||
<div>
|
||||
<div class="large-12 columns">
|
||||
<table class="dataTable pci_devices">
|
||||
<thead>
|
||||
|
@ -91,9 +91,7 @@
|
||||
<div class="large-12 columns">
|
||||
<label for="SCHED_RANK">
|
||||
{{tr "Expression"}}
|
||||
<span class="tip">
|
||||
{{tr "This field sets which attribute will be used to sort the suitable hosts for this VM"}}.
|
||||
</span>
|
||||
{{{tip (tr "This field sets which attribute will be used to sort the suitable hosts for this VM")}}}.
|
||||
</label>
|
||||
<input type="text" wizard_field="SCHED_RANK" id="SCHED_RANK" name="RANK" />
|
||||
</div>
|
||||
|
@ -19,8 +19,8 @@
|
||||
<table class="dataTable policies_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{tr "KEY"}}</th>
|
||||
<th>{{tr "VALUE"}}</th>
|
||||
<th>{{tr "Key"}}</th>
|
||||
<th>{{tr "Value"}}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
Loading…
x
Reference in New Issue
Block a user