mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-16 22:50:10 +03:00
* Made changes in info tab. * Made changes in network tab, to attach/detach alias. * Made changes in VM template update/instantiate.
This commit is contained in:
parent
e582a12047
commit
3a9034a010
@ -110,7 +110,7 @@ module OpenNebulaJSON
|
||||
|
||||
template = template_to_str(params['template'])
|
||||
|
||||
['NIC', 'SCHED_ACTION', 'SCHED_REQUIREMENTS', 'SCHED_DS_REQUIREMENTS'].each { |i|
|
||||
['NIC', 'NIC_ALIAS', 'SCHED_ACTION', 'SCHED_REQUIREMENTS', 'SCHED_DS_REQUIREMENTS'].each { |i|
|
||||
if params['template'][i] && params['template'][i].empty?
|
||||
template << "\n#{i} = []"
|
||||
end
|
||||
|
@ -298,6 +298,16 @@ define(function(require) {
|
||||
"VROUTER_IP6_ULA"
|
||||
];
|
||||
|
||||
var NIC_ALIAS_IP_ATTRS = [
|
||||
"IP",
|
||||
"IP6",
|
||||
"IP6_GLOBAL",
|
||||
"IP6_ULA",
|
||||
"VROUTER_IP",
|
||||
"VROUTER_IP6_GLOBAL",
|
||||
"VROUTER_IP6_ULA"
|
||||
];
|
||||
|
||||
var EXTERNAL_NETWORK_ATTRIBUTES = [
|
||||
'GUEST_IP',
|
||||
'GUEST_IP_ADDRESSES',
|
||||
@ -654,6 +664,7 @@ define(function(require) {
|
||||
return MIGRATE_ACTION_STR[stateId];
|
||||
},
|
||||
"ipsStr": ipsStr,
|
||||
"aliasStr": aliasStr,
|
||||
"retrieveExternalIPs": retrieveExternalIPs,
|
||||
"retrieveExternalNetworkAttrs": retrieveExternalNetworkAttrs,
|
||||
"isNICGraphsSupported": isNICGraphsSupported,
|
||||
@ -802,6 +813,38 @@ define(function(require) {
|
||||
}
|
||||
};
|
||||
|
||||
// Return the Alias or several Aliases of a VM
|
||||
function aliasStr(element, divider) {
|
||||
var divider = divider || "<br>"
|
||||
var nic_alias = element.TEMPLATE.NIC_ALIAS;
|
||||
var ips = [];
|
||||
|
||||
if (nic_alias == undefined){
|
||||
nic_alias = [];
|
||||
}
|
||||
|
||||
if (!$.isArray(nic_alias)) {
|
||||
nic_alias = [nic_alias];
|
||||
}
|
||||
|
||||
if(ips.length==0)
|
||||
{
|
||||
$.each(nic_alias, function(index, value) {
|
||||
$.each(NIC_ALIAS_IP_ATTRS, function(j, attr){
|
||||
if (value[attr]) {
|
||||
ips.push(value[attr]);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (ips.length > 0) {
|
||||
return ips.join(divider);
|
||||
} else {
|
||||
return '--';
|
||||
}
|
||||
};
|
||||
|
||||
// returns true if the vnc button should be enabled
|
||||
function isVNCSupported(element) {
|
||||
var graphics = element.TEMPLATE.GRAPHICS;
|
||||
|
@ -160,6 +160,8 @@ define(function(require) {
|
||||
var templateJSON = {}
|
||||
$.each(this.wizardTabs, function(index, wizardTab) {
|
||||
$.extend(true, templateJSON, wizardTab.retrieve($('#' + wizardTab.wizardTabId, context)));
|
||||
|
||||
var a = templateJSON;
|
||||
});
|
||||
|
||||
// vCenter PUBLIC_CLOUD is not defined in the hybrid tab. Because it is
|
||||
@ -174,6 +176,16 @@ define(function(require) {
|
||||
// part of an array, and it is filled in different tabs, the $.extend deep
|
||||
// merge can't work. We define an auxiliary attribute for it.
|
||||
|
||||
if (templateJSON["NIC_ALIAS"]) {
|
||||
var alias = templateJSON["NIC_ALIAS"];
|
||||
|
||||
if (alias) {
|
||||
templateJSON["NIC_ALIAS"] = alias;
|
||||
} else {
|
||||
delete templateJSON["NIC_ALIAS"];
|
||||
}
|
||||
}
|
||||
|
||||
if (templateJSON["NIC_PCI"] != undefined) {
|
||||
if (templateJSON['PCI'] == undefined) {
|
||||
templateJSON['PCI'] = [];
|
||||
|
@ -53,6 +53,7 @@ define(function(require) {
|
||||
this.wizardTabId = WIZARD_TAB_ID + UniqueId.id();
|
||||
this.icon = 'fa-globe';
|
||||
this.title = Locale.tr("Network");
|
||||
this.nics = [];
|
||||
this.classes = "hypervisor";
|
||||
|
||||
if(opts.listener != undefined){
|
||||
@ -115,6 +116,7 @@ define(function(require) {
|
||||
var templateJSON = {}
|
||||
var nicsJSON = [];
|
||||
var pcisJSON = [];
|
||||
var aliasJSON = [];
|
||||
|
||||
var tmpJSON;
|
||||
$.each(this.nicTabObjects, function(id, nicTab) {
|
||||
@ -124,6 +126,8 @@ define(function(require) {
|
||||
delete tmpJSON["NIC_PCI"];
|
||||
tmpJSON["TYPE"] = "NIC";
|
||||
pcisJSON.push(tmpJSON);
|
||||
} else if (tmpJSON["PARENT"]) {
|
||||
aliasJSON.push(tmpJSON);
|
||||
} else {
|
||||
nicsJSON.push(tmpJSON);
|
||||
}
|
||||
@ -131,6 +135,7 @@ define(function(require) {
|
||||
})
|
||||
|
||||
if (nicsJSON.length > 0) { templateJSON['NIC'] = nicsJSON; };
|
||||
if (aliasJSON.length > 0) { templateJSON['NIC_ALIAS'] = aliasJSON; };
|
||||
if (pcisJSON.length > 0) { templateJSON['NIC_PCI'] = pcisJSON; };
|
||||
|
||||
var nicDefault = WizardFields.retrieveInput($('#DEFAULT_MODEL', context));
|
||||
@ -146,6 +151,7 @@ define(function(require) {
|
||||
function _fill(context, templateJSON) {
|
||||
var that = this;
|
||||
var nics = [];
|
||||
var alias = [];
|
||||
|
||||
if (templateJSON.NIC != undefined){
|
||||
nics = templateJSON.NIC;
|
||||
@ -155,6 +161,18 @@ define(function(require) {
|
||||
nics = [nics];
|
||||
}
|
||||
|
||||
if (templateJSON.NIC_ALIAS != undefined){
|
||||
alias = templateJSON.NIC_ALIAS;
|
||||
}
|
||||
|
||||
if (!(alias instanceof Array)) {
|
||||
alias = [alias];
|
||||
}
|
||||
|
||||
$.each(alias, function() {
|
||||
nics.push(this);
|
||||
});
|
||||
|
||||
if (templateJSON.PCI != undefined){
|
||||
var pcis = templateJSON.PCI;
|
||||
|
||||
@ -177,12 +195,22 @@ define(function(require) {
|
||||
var nicTab = that.nicTabObjects[that.numberOfNics];
|
||||
var nicContext = $('#' + nicTab.nicTabId, context);
|
||||
nicTab.fill(nicContext, nicJSON);
|
||||
|
||||
if (nicJSON.PARENT) {
|
||||
nicTab.fill_alias(nicJSON.PARENT);
|
||||
}
|
||||
});
|
||||
|
||||
that.renameTabLinks(context);
|
||||
|
||||
if (templateJSON.NIC) {
|
||||
delete templateJSON.NIC;
|
||||
}
|
||||
|
||||
if (templateJSON.NIC_ALIAS) {
|
||||
delete templateJSON.NIC_ALIAS;
|
||||
}
|
||||
|
||||
if (templateJSON.PCI != undefined) {
|
||||
var pcis = templateJSON.PCI;
|
||||
|
||||
@ -215,8 +243,13 @@ define(function(require) {
|
||||
|
||||
function _addNicTab(context) {
|
||||
var that = this;
|
||||
|
||||
if (!that.nics.find(nic => nic.NAME === ("NIC" + that.numberOfNics))) {
|
||||
that.nics.push({"NAME": "NIC" + that.numberOfNics, "ALIAS": false});
|
||||
}
|
||||
|
||||
that.numberOfNics++;
|
||||
var nicTab = new NicTab(that.numberOfNics);
|
||||
var nicTab = new NicTab(that.numberOfNics, that.nics);
|
||||
|
||||
var content = $('<div id="' + nicTab.nicTabId + '" class="nic wizard_internal_tab tabs-panel">' +
|
||||
nicTab.html() +
|
||||
@ -242,11 +275,14 @@ define(function(require) {
|
||||
var li = $(this).closest('li');
|
||||
var ul = $(this).closest('ul');
|
||||
var content = $(target);
|
||||
var nicId = content.attr("nicId");
|
||||
var index = that.nics.findIndex(nic => nic.NAME === ("NIC" + (nicId - 1)));
|
||||
|
||||
that.nics.splice(index, 1);
|
||||
|
||||
li.remove();
|
||||
content.remove();
|
||||
|
||||
var nicId = content.attr("nicId");
|
||||
delete that.nicTabObjects[nicId];
|
||||
|
||||
if (li.hasClass('is-active')) {
|
||||
@ -254,12 +290,19 @@ define(function(require) {
|
||||
}
|
||||
|
||||
that.renameTabLinks(context);
|
||||
that.numberOfNics --;
|
||||
});
|
||||
}
|
||||
|
||||
function _renameTabLinks(context) {
|
||||
$("#" + LINKS_CONTAINER_ID + " li", context).each(function(index) {
|
||||
$("a", this).html(Locale.tr("NIC") + ' ' + index + " <i class='fa fa-times-circle remove-tab'></i>");
|
||||
$("a", this).html(Locale.tr("NIC") + ' ' + index + " <i id='remove_nic_" + index + "'class='fa fa-times-circle remove-tab'></i>");
|
||||
|
||||
if (!that.nics.find(nic => nic.ALIAS === ("NIC" + index))) {
|
||||
$("#remove_nic_" + index).show();
|
||||
} else {
|
||||
$("#remove_nic_" + index).hide();
|
||||
}
|
||||
})
|
||||
|
||||
if(this.listener != undefined){
|
||||
|
@ -43,9 +43,11 @@ define(function(require) {
|
||||
CONSTRUCTOR
|
||||
*/
|
||||
|
||||
function NicTab(nicTabId) {
|
||||
function NicTab(nicTabId, nics) {
|
||||
that = this;
|
||||
this.nicId = nicTabId - 1;
|
||||
this.nicTabId = 'nicTab' + nicTabId + UniqueId.id();
|
||||
this.nics = nics;
|
||||
|
||||
var options = {
|
||||
'select': true,
|
||||
@ -78,6 +80,7 @@ define(function(require) {
|
||||
NicTab.prototype.retrieve = _retrieve;
|
||||
NicTab.prototype.fill = _fill;
|
||||
NicTab.prototype.generateRequirements = _generateRequirements;
|
||||
NicTab.prototype.fill_alias = _fill_alias;
|
||||
|
||||
return NicTab;
|
||||
|
||||
@ -107,6 +110,7 @@ define(function(require) {
|
||||
*/
|
||||
function _setup(context, options) {
|
||||
var that = this;
|
||||
that.context = context;
|
||||
|
||||
if (options != undefined && options.hide_pci == true){
|
||||
$("input.pci-type-nic", context).attr('disabled', 'disabled');
|
||||
@ -194,14 +198,128 @@ define(function(require) {
|
||||
if(network_mode_on){
|
||||
$(".no_auto", context).hide();
|
||||
$(".auto", context).show();
|
||||
$("#" + that.nicTabId + "interface_type", context).hide();
|
||||
} else {
|
||||
$(".auto", context).hide();
|
||||
$(".no_auto", context).show();
|
||||
$("#" + that.nicTabId + "interface_type", context).show();
|
||||
}
|
||||
});
|
||||
|
||||
$(".auto", context).hide();
|
||||
|
||||
$("input#" + this.nicTabId + "_interface_type", context).on("change", function(){
|
||||
var alias_on = $(this).prop("checked");
|
||||
var alias;
|
||||
var found = false;
|
||||
|
||||
$.each(that.nics, function(index, value) {
|
||||
if (value.ALIAS === ("NIC" + that.nicId)) {
|
||||
alias = value.ALIAS;
|
||||
}
|
||||
});
|
||||
|
||||
$("#" + that.nicTabId + "_alias_parent", context).empty();
|
||||
$("#" + that.nicTabId + "_alias_parent", context).append(new Option("Choose NIC", "INVALID"));
|
||||
$("#" + that.nicTabId + "_alias_parent", context).val("INVALID");
|
||||
$("#" + that.nicTabId + "_no_alias", context).html("Nic has alias");
|
||||
|
||||
if (that.nics.length == 1 && alias_on) {
|
||||
$("#" + that.nicTabId + "_alias_parent", context).hide();
|
||||
$(".network_selection", context).hide();
|
||||
$("#" + that.nicTabId + "_no_alias", context).html("No NIC available");
|
||||
$("#" + that.nicTabId + "_no_alias").show();
|
||||
} else {
|
||||
if(alias_on && !alias) {
|
||||
$("#" + that.nicTabId + "_alias_parent", context).show();
|
||||
$(".network_selection", context).hide();
|
||||
$("#" + that.nicTabId + "_no_alias").hide();
|
||||
} else if (alias_on && alias) {
|
||||
$("#" + that.nicTabId + "_alias_parent", context).hide();
|
||||
$(".network_selection", context).hide();
|
||||
$("#" + that.nicTabId + "_no_alias").show();
|
||||
} else {
|
||||
$.each(that.nics, function(index, value) {
|
||||
if (value.NAME == ("NIC" + that.nicId)) {
|
||||
alias = value.ALIAS;
|
||||
value.ALIAS = false;
|
||||
}
|
||||
});
|
||||
|
||||
if (alias) {
|
||||
$.each(that.nics, function(index, value) {
|
||||
if (value.ALIAS == alias) {
|
||||
found = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (found) {
|
||||
$("#remove_nic_" + (alias[alias.length - 1])).hide();
|
||||
} else {
|
||||
$("#remove_nic_" + (alias[alias.length - 1])).show();
|
||||
}
|
||||
}
|
||||
|
||||
$("#" + that.nicTabId + "_alias_parent", context).hide();
|
||||
$(".network_selection", context).show();
|
||||
$("#" + that.nicTabId + "_no_alias").hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#" + this.nicTabId + "_no_alias").hide();
|
||||
|
||||
$("#" + this.nicTabId + "_alias_parent", context).append(new Option("Choose NIC", "INVALID"));
|
||||
$("#" + this.nicTabId + "_alias_parent", context).val("INVALID");
|
||||
|
||||
$("#" + this.nicTabId + "_alias_parent", context).on("click", function(){
|
||||
var selected_nic = $("#" + that.nicTabId + "_alias_parent", context).val();
|
||||
var add = false;
|
||||
var found = false;
|
||||
|
||||
$("#" + that.nicTabId + "_alias_parent").empty();
|
||||
|
||||
that.nics.forEach(function(element) {
|
||||
if(element.NAME != ("NIC" + that.nicId) && !element.ALIAS &&
|
||||
(that.nicId > element.NAME[element.NAME.length - 1])) {
|
||||
$("#" + that.nicTabId + "_alias_parent").append(new Option(element.NAME, element.NAME));
|
||||
add = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (!add) {
|
||||
$("#" + that.nicTabId + "_alias_parent", context).append(new Option("No NIC available", "INVALID"));
|
||||
$("#" + that.nicTabId + "_alias_parent", context).val("INVALID");
|
||||
} else if (add && selected_nic == "INVALID") {
|
||||
$("#" + that.nicTabId + "_alias_parent", context).val($("#" + that.nicTabId + "_alias_parent option:first").val());
|
||||
selected_nic = $("#" + that.nicTabId + "_alias_parent", context).val();
|
||||
}
|
||||
|
||||
$.each(that.nics, function(index, value) {
|
||||
if (value.NAME == ("NIC" + that.nicId) && selected_nic != "INVALID") {
|
||||
value.ALIAS = selected_nic;
|
||||
}
|
||||
});
|
||||
|
||||
if (selected_nic && selected_nic != "INVALID") {
|
||||
$.each(that.nics, function(index, value) {
|
||||
if (value.ALIAS == selected_nic) {
|
||||
found = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (found) {
|
||||
$("#remove_nic_" + (selected_nic[selected_nic.length - 1])).hide();
|
||||
} else {
|
||||
$("#remove_nic_" + (selected_nic[selected_nic.length - 1])).show();
|
||||
}
|
||||
|
||||
$("#" + that.nicTabId + "_alias_parent", context).val(selected_nic);
|
||||
}
|
||||
});
|
||||
|
||||
$("#" + this.nicTabId + "_alias_parent", context).hide();
|
||||
|
||||
context.on("change", "input[name='" + that.nicTabId + "_req_select']", function() {
|
||||
if ($("input[name='" + that.nicTabId + "_req_select']:checked").val() == "vnet_select") {
|
||||
$("#"+ that.nicTabId +"_vnetTable",context).show();
|
||||
@ -255,6 +373,13 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
|
||||
if(!$("input#" + this.nicTabId + "_interface_type", context).prop("checked") ||
|
||||
$("#" + this.nicTabId + "_alias_parent", context).val() == "INVALID") {
|
||||
delete nicJSON["PARENT"];
|
||||
} else {
|
||||
nicJSON["PARENT"] = $("#" + this.nicTabId + "_alias_parent", context).val();
|
||||
}
|
||||
|
||||
return nicJSON;
|
||||
}
|
||||
|
||||
@ -376,4 +501,20 @@ define(function(require) {
|
||||
|
||||
$("input#"+this.nicTabId+"_SCHED_REQUIREMENTS", context).val(req_string.join(" | "));
|
||||
};
|
||||
|
||||
function _fill_alias(nicname) {
|
||||
$.each(this.nics, function(index, value) {
|
||||
if (value.NAME == ("NIC" + that.nicId)) {
|
||||
value.ALIAS = nicname;
|
||||
}
|
||||
});
|
||||
|
||||
$("#" + this.nicTabId + "interface_type", this.context).show();
|
||||
$("input#" + this.nicTabId + "_interface_type", this.context).click();
|
||||
$("#" + this.nicTabId + "_alias_parent", this.context).show();
|
||||
$("#" + this.nicTabId + "_alias_parent", this.context).empty();
|
||||
$("#" + this.nicTabId + "_alias_parent").append(new Option(nicname, nicname));
|
||||
$("#" + this.nicTabId + "_alias_parent", this.context).val(nicname);
|
||||
$(".network_selection", this.context).hide();
|
||||
}
|
||||
});
|
||||
|
@ -17,16 +17,37 @@
|
||||
<div class="only_create">
|
||||
<div class="row autoContainer">
|
||||
<div class="large-12 large-centered columns">
|
||||
<div class="switch left">
|
||||
<input class="switch-input" id="{{nicTabId}}_network_mode" type="checkbox">
|
||||
<label class="switch-paddle" for="{{nicTabId}}_network_mode">
|
||||
</label>
|
||||
</div>
|
||||
<label class="left">
|
||||
|
||||
{{tr "Automatic selection"}}
|
||||
{{{tip (tr "The Schedule will decide which is the bets virtual network")}}}
|
||||
</label>
|
||||
<fieldset id="{{nicTabId}}interface_type">
|
||||
<legend>{{tr "Interface type"}}</legend>
|
||||
<div class="switch left">
|
||||
<input class="switch-input" id="{{nicTabId}}_interface_type" type="checkbox">
|
||||
<label class="switch-paddle" for="{{nicTabId}}_interface_type">
|
||||
</label>
|
||||
</div>
|
||||
<label class="left">
|
||||
|
||||
{{tr "Alias"}}
|
||||
{{{tip (tr "The NIC will be attached as an alias")}}}
|
||||
</label>
|
||||
|
||||
<span id="{{nicTabId}}_no_alias" class="radius warning label">
|
||||
<i class="fas fa-exclamation-triangle"/> {{tr "NIC has alias"}}
|
||||
</span>
|
||||
<select id="{{nicTabId}}_alias_parent" style="width: 200px; margin-left: 5px"></select>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{tr "Network selection"}}</legend>
|
||||
<div class="switch left network_selection">
|
||||
<input class="switch-input" id="{{nicTabId}}_network_mode" type="checkbox">
|
||||
<label class="switch-paddle" for="{{nicTabId}}_network_mode">
|
||||
</label>
|
||||
</div>
|
||||
<label class="left network_selection">
|
||||
|
||||
{{tr "Automatic selection"}}
|
||||
{{{tip (tr "The Schedule will decide which is the bets virtual network")}}}
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="auto">
|
||||
|
@ -259,16 +259,20 @@ define(function(require) {
|
||||
|
||||
var nics = [];
|
||||
var pcis = [];
|
||||
var alias = [];
|
||||
|
||||
$.each(networks, function(){
|
||||
if (this.TYPE == "NIC"){
|
||||
pcis.push(this);
|
||||
} else if (this.PARENT) {
|
||||
alias.push(this);
|
||||
} else {
|
||||
nics.push(this);
|
||||
}
|
||||
});
|
||||
|
||||
tmp_json.NIC = nics;
|
||||
tmp_json.NIC_ALIAS = alias;
|
||||
|
||||
// Replace PCIs of type nic only
|
||||
var original_tmpl = that.template_objects[index].VMTEMPLATE;
|
||||
@ -297,6 +301,10 @@ define(function(require) {
|
||||
tmp_json.PCI = pcis;
|
||||
}
|
||||
|
||||
if (alias.length > 0) {
|
||||
tmp_json.NIC_ALIAS = alias;
|
||||
}
|
||||
|
||||
if (Config.isFeatureEnabled("vcenter_vm_folder")){
|
||||
if(!$.isEmptyObject(original_tmpl.TEMPLATE.HYPERVISOR) &&
|
||||
original_tmpl.TEMPLATE.HYPERVISOR === "vcenter"){
|
||||
|
@ -53,6 +53,7 @@ define(function(require) {
|
||||
Dialog.prototype.onShow = _onShow;
|
||||
Dialog.prototype.setup = _setup;
|
||||
Dialog.prototype.setElement = _setElement;
|
||||
Dialog.prototype.setNicsNames = _setNicsNames;
|
||||
|
||||
return Dialog;
|
||||
|
||||
@ -68,15 +69,37 @@ define(function(require) {
|
||||
}
|
||||
|
||||
function _setup(context) {
|
||||
this.context = context;
|
||||
|
||||
var that = this;
|
||||
|
||||
that.nicTab.setup(context, {hide_pci: true, hide_auto: true});
|
||||
|
||||
Tips.setup(context);
|
||||
|
||||
$("#parent", context).hide();
|
||||
|
||||
$("#attach_alias", context).change(function() {
|
||||
if(this.checked) {
|
||||
$("#parent", context).show();
|
||||
} else {
|
||||
$("#parent", context).hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('#' + DIALOG_ID + 'Form', context).submit(function() {
|
||||
var templateJSON = that.nicTab.retrieve(context);
|
||||
var obj = {
|
||||
"NIC": templateJSON
|
||||
|
||||
if($("#attach_alias", context).prop("checked")) {
|
||||
templateJSON.PARENT = $("#parent").val();
|
||||
|
||||
var obj = {
|
||||
"NIC_ALIAS": templateJSON
|
||||
}
|
||||
} else {
|
||||
var obj = {
|
||||
"NIC": templateJSON
|
||||
}
|
||||
}
|
||||
|
||||
Sunstone.runAction('VM.attachnic', that.element.ID, obj);
|
||||
@ -100,4 +123,15 @@ define(function(require) {
|
||||
function _setElement(element) {
|
||||
this.element = element
|
||||
}
|
||||
|
||||
function _setNicsNames(nicsNames) {
|
||||
$("#parent", this.context).empty();
|
||||
var that = this;
|
||||
|
||||
nicsNames.forEach(function(element) {
|
||||
var alias_str = element.ID + " " + element.NET + " " + element.IP;
|
||||
|
||||
$("#parent", that.context).append(new Option(alias_str, element.NAME));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -23,6 +23,8 @@
|
||||
<div class="confirm-resources-header"></div>
|
||||
<div class="reveal-body">
|
||||
<form id="{{dialogId}}Form" action="">
|
||||
<input type="checkbox" id="attach_alias" style="margin-left: 15px"> Attach as an alias
|
||||
<select id="parent" style="width: 200px"></select><br>
|
||||
{{{nicTabHTML}}}
|
||||
<div class="reveal-footer">
|
||||
<div class="form_buttons">
|
||||
|
@ -80,6 +80,8 @@ define(function(require) {
|
||||
|
||||
var IP = OpenNebula.VM.ipsStr(this.element);
|
||||
|
||||
var alias = OpenNebula.VM.aliasStr(this.element);
|
||||
|
||||
if (this.element.TEMPLATE.VROUTER_ID != undefined){
|
||||
vrouterHTML = Navigation.link(
|
||||
OpenNebula.VirtualRouter.getName(this.element.TEMPLATE.VROUTER_ID),
|
||||
@ -133,6 +135,7 @@ define(function(require) {
|
||||
"prettyStartTime": prettyStartTime,
|
||||
"deployId": deployId,
|
||||
"IP": IP,
|
||||
"alias": alias,
|
||||
"resched": resched,
|
||||
"permissionsTableHTML": permissionsTableHTML,
|
||||
"templateTableVcenterHTML": templateTableVcenterHTML,
|
||||
|
@ -53,6 +53,12 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="key_td">{{tr "Alias"}}</td>
|
||||
<td class="value_td">{{{alias}}}</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="key_td">{{tr "Start time"}}</td>
|
||||
<td class="value_td">{{prettyStartTime}}</td>
|
||||
|
@ -229,6 +229,8 @@ define(function(require) {
|
||||
var that = this;
|
||||
|
||||
var nics = []
|
||||
var nics_names = []
|
||||
var alias = []
|
||||
|
||||
if ($.isArray(that.element.TEMPLATE.NIC)){
|
||||
nics = that.element.TEMPLATE.NIC;
|
||||
@ -236,6 +238,12 @@ define(function(require) {
|
||||
nics = [that.element.TEMPLATE.NIC];
|
||||
}
|
||||
|
||||
if ($.isArray(that.element.TEMPLATE.NIC_ALIAS)){
|
||||
alias = that.element.TEMPLATE.NIC_ALIAS;
|
||||
} else if (!$.isEmptyObject(that.element.TEMPLATE.NIC_ALIAS)){
|
||||
alias = [that.element.TEMPLATE.NIC_ALIAS];
|
||||
}
|
||||
|
||||
var pcis = [];
|
||||
|
||||
if ($.isArray(that.element.TEMPLATE.PCI)){
|
||||
@ -257,19 +265,20 @@ define(function(require) {
|
||||
for (var i = 0; i < nics.length; i++) {
|
||||
var nic = nics[i];
|
||||
|
||||
nics_names.push({ NAME: nic.NAME, IP: nic.IP, NET: nic.NETWORK, ID: nic.NIC_ID });
|
||||
|
||||
var is_pci = (nic.PCI_ID != undefined);
|
||||
|
||||
var actions = '';
|
||||
// Attach / Detach
|
||||
if (!is_pci){
|
||||
if ( (that.element.STATE == OpenNebulaVM.STATES.ACTIVE) &&
|
||||
(that.element.LCM_STATE == OpenNebulaVM.LCM_STATES.HOTPLUG_NIC) &&
|
||||
(nic.ATTACH == "YES") ) {
|
||||
(that.element.LCM_STATE == OpenNebulaVM.LCM_STATES.HOTPLUG_NIC)) {
|
||||
actions = Locale.tr("attach/detach in progress")
|
||||
} else {
|
||||
if ( (Config.isTabActionEnabled("vms-tab", "VM.detachnic")) &&
|
||||
(StateActions.enabledStateAction("VM.detachnic", that.element.STATE, that.element.LCM_STATE))) {
|
||||
actions += '<a href="VM.detachnic" class="detachnic" ><i class="fas fa-times"/>' + Locale.tr("Detach") + '</a>'
|
||||
actions += '<a href="VM.detachnic" class="detachnic" ><i class="fas fa-times"/></a>'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -304,10 +313,26 @@ define(function(require) {
|
||||
ipStr = "IP6"
|
||||
}
|
||||
|
||||
var nic_alias = [];
|
||||
var alias_ids = [];
|
||||
|
||||
if (nic.ALIAS_IDS) {
|
||||
alias_ids = nic.ALIAS_IDS.split(",");
|
||||
}
|
||||
|
||||
for(var j = 0; j < alias.length; j++) {
|
||||
if (alias_ids.length > 0 && alias_ids.includes(alias[j].NIC_ID)) {
|
||||
alias[j].ACTIONS = actions;
|
||||
|
||||
nic_alias.push(alias[j]);
|
||||
}
|
||||
}
|
||||
|
||||
nic_dt_data.push({
|
||||
NIC_ID : nic.NIC_ID,
|
||||
NETWORK : Navigation.link(nic.NETWORK, "vnets-tab", nic.NETWORK_ID),
|
||||
IP : _ipTr(nic, ipStr),
|
||||
NIC_ALIAS : nic_alias,
|
||||
MAC : nic.MAC,
|
||||
PCI_ADDRESS: pci_address,
|
||||
IP6_ULA : _ipTr(nic, "IP6_ULA"),
|
||||
@ -335,7 +360,7 @@ define(function(require) {
|
||||
{"data": "PCI_ADDRESS","defaultContent": ""},
|
||||
{"data": "IP6_ULA", "defaultContent": "", "class": "nowrap"},
|
||||
{"data": "IP6_GLOBAL", "defaultContent": "", "class": "nowrap"},
|
||||
{"data": "ACTIONS", "defaultContent": "", "orderable": false},
|
||||
{"data": "ACTIONS", "defaultContent": "", "orderable": false, "className": "text-center"},
|
||||
{"defaultContent": "", "orderable": false}
|
||||
],
|
||||
|
||||
@ -363,7 +388,28 @@ define(function(require) {
|
||||
$(this).children("span").addClass('fa-chevron-down');
|
||||
$(this).children("span").removeClass('fa-chevron-up');
|
||||
} else {
|
||||
var html = '<div style="padding-left: 30px;">\
|
||||
if(row.data().NIC_ALIAS.length > 0) {
|
||||
var html = '';
|
||||
|
||||
$.each(row.data().NIC_ALIAS, function(index, elem) {
|
||||
var new_div = '<div id=alias_' + this.NIC_ID + ' style="margin-left: 40px; margin-bottom: 5px">' +
|
||||
'<b>' + "- Alias-" + this.ALIAS_ID + ":" + '</b>' +
|
||||
" " + this.IP +
|
||||
" " + this.MAC +
|
||||
" " + this.ACTIONS + '</div>';
|
||||
|
||||
html += new_div;
|
||||
|
||||
if (Config.isTabActionEnabled("vms-tab", "VM.detachnic")) {
|
||||
context.off('click', '.detachnic');
|
||||
context.on('click', '.detachnic', {element_id: that.element.ID}, detach_alias);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
html = '';
|
||||
}
|
||||
|
||||
html += '<div style="padding-left: 30px;">\
|
||||
<table class="dataTable">\
|
||||
<thead>\
|
||||
<tr>\
|
||||
@ -396,6 +442,9 @@ define(function(require) {
|
||||
row.child(html).show();
|
||||
$(this).children("span").removeClass('fa-chevron-down');
|
||||
$(this).children("span").addClass('fa-chevron-up');
|
||||
$.each(row.data().NIC_ALIAS, function(index, elem) {
|
||||
$("#alias_" + this.NIC_ID).attr("nic_id", this.NIC_ID);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@ -404,6 +453,7 @@ define(function(require) {
|
||||
context.on('click', '#attach_nic', function() {
|
||||
var dialog = Sunstone.getDialog(ATTACH_NIC_DIALOG_ID);
|
||||
dialog.setElement(that.element);
|
||||
dialog.setNicsNames(nics_names);
|
||||
dialog.show();
|
||||
return false;
|
||||
});
|
||||
@ -433,6 +483,27 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
|
||||
function detach_alias(event) {
|
||||
var nic_id = $(this).parent().attr("nic_id");
|
||||
var element_id = event.data.element_id;
|
||||
|
||||
Sunstone.getDialog(CONFIRM_DIALOG_ID).setParams({
|
||||
//header :
|
||||
headerTabId: TAB_ID,
|
||||
body : Locale.tr("This will detach the alias immediately"),
|
||||
//question :
|
||||
submit : function(){
|
||||
Sunstone.runAction('VM.detachnic', element_id, nic_id);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
Sunstone.getDialog(CONFIRM_DIALOG_ID).reset();
|
||||
Sunstone.getDialog(CONFIRM_DIALOG_ID).show();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function _onShow(context) {
|
||||
var that = this;
|
||||
if (OpenNebulaVM.isNICGraphsSupported(that.element)) {
|
||||
|
@ -27,6 +27,8 @@ define(function(require) {
|
||||
var TemplateUtils = require('utils/template-utils');
|
||||
|
||||
var provision_nic_accordion_dd_id = 0;
|
||||
var nicId = 0;
|
||||
var _nics = [];
|
||||
|
||||
return {
|
||||
'insert': _insert,
|
||||
@ -49,6 +51,11 @@ define(function(require) {
|
||||
* - securityGroups {bool}: true to select SGs
|
||||
*/
|
||||
function _insert(template_json, context, options) {
|
||||
this.context = context;
|
||||
|
||||
nicId = 0;
|
||||
_nics = [];
|
||||
|
||||
if (options == undefined){
|
||||
options = {};
|
||||
}
|
||||
@ -79,6 +86,19 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
|
||||
var template_alias = template_json.VMTEMPLATE.TEMPLATE.NIC_ALIAS
|
||||
var alias = [];
|
||||
|
||||
if ($.isArray(template_alias)){
|
||||
alias = template_alias;
|
||||
} else if (!$.isEmptyObject(template_alias)){
|
||||
alias = [template_alias];
|
||||
}
|
||||
|
||||
$.each(alias, function(){
|
||||
nics.push(this);
|
||||
});
|
||||
|
||||
_generate_provision_network_accordion(
|
||||
$(".provision_network_selector", context), options);
|
||||
|
||||
@ -88,10 +108,18 @@ define(function(require) {
|
||||
|
||||
opt.pci = (nic.TYPE == "NIC");
|
||||
|
||||
if (!_nics.find(nic => nic.NAME === ("NIC" + nicId))) {
|
||||
_nics.push({"NAME": "NIC" + nicId, "ALIAS": false, "DD_ID": provision_nic_accordion_dd_id});
|
||||
}
|
||||
|
||||
_generate_provision_network_table(
|
||||
$(".provision_nic_accordion", context),
|
||||
opt);
|
||||
})
|
||||
|
||||
nicId ++;
|
||||
});
|
||||
|
||||
_hide_remove(context);
|
||||
}
|
||||
} catch(err) {
|
||||
_generate_provision_network_accordion(
|
||||
@ -134,6 +162,16 @@ define(function(require) {
|
||||
delete nic["SCHED_RANK"];
|
||||
}
|
||||
|
||||
if($("input#" + that.id + "_interface_type", context).prop("checked")) {
|
||||
if ($("#" + that.id + "_alias_parent", context).val() != "INVALID") {
|
||||
nic["PARENT"] = $("#" + that.id + "_alias_parent", context).val();
|
||||
} else {
|
||||
delete nic["PARENT"];
|
||||
}
|
||||
} else {
|
||||
delete nic["PARENT"];
|
||||
}
|
||||
|
||||
if ( !nic["NETWORK_MODE"] || ( nic["NETWORK_MODE"] && nic["NETWORK_MODE"] !== "auto" ) )
|
||||
{
|
||||
|
||||
@ -257,6 +295,9 @@ define(function(require) {
|
||||
options: options
|
||||
})).appendTo(context);
|
||||
|
||||
dd_context["nic_id"] = nicId;
|
||||
dd_context["dd_id"] = provision_nic_accordion_dd_id;
|
||||
|
||||
var selectOptions = {
|
||||
'selectOptions': {
|
||||
'select_callback': function(aData, options) {
|
||||
@ -305,6 +346,93 @@ define(function(require) {
|
||||
}
|
||||
});
|
||||
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_no_alias").hide();
|
||||
|
||||
$("input#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_interface_type", dd_context).on("change", function(){
|
||||
var alias_on = $(this).prop("checked");
|
||||
var alias;
|
||||
|
||||
$.each(_nics, function(index, value) {
|
||||
if (value.ALIAS == ("NIC" + dd_context["nic_id"])) {
|
||||
alias = value.ALIAS;
|
||||
}
|
||||
});
|
||||
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).empty();
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).append(new Option("Choose NIC", "INVALID"));
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).val("INVALID");
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_no_alias", dd_context).html("Nic has alias");
|
||||
|
||||
if (_nics.length == 1 && alias_on) {
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).hide();
|
||||
$(".network_selection", context, dd_context).hide();
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_no_alias", dd_context).html("No NIC available");
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_no_alias"), dd_context.show();
|
||||
} else {
|
||||
if(alias_on && !alias) {
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).show();
|
||||
$(".network_selection", dd_context).hide();
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_no_alias", dd_context).hide();
|
||||
} else if (alias_on && alias) {
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).hide();
|
||||
$(".network_selection", dd_context).hide();
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_no_alias", dd_context).show();
|
||||
} else {
|
||||
$.each(_nics, function(index, value) {
|
||||
if (value.NAME == ("NIC" + dd_context["nic_id"])) {
|
||||
value.ALIAS = false;
|
||||
}
|
||||
});
|
||||
|
||||
_hide_remove(that.context);
|
||||
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).hide();
|
||||
$(".network_selection", dd_context).show();
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_no_alias", dd_context).hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent", dd_context).append(new Option("Choose NIC", "INVALID"));
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent", dd_context).val("INVALID");
|
||||
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent", dd_context).on("click", function(){
|
||||
var selected_nic = $("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).val();
|
||||
var add = false;
|
||||
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).empty();
|
||||
|
||||
_nics.forEach(function(element) {
|
||||
if(element.NAME != ("NIC" + dd_context["nic_id"]) && !element.ALIAS &&
|
||||
(dd_context["nic_id"] > element.NAME[element.NAME.length - 1])) {
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent").append(new Option(element.NAME, element.NAME));
|
||||
add = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (!add) {
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).append(new Option("No NIC available", "INVALID"));
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).val("INVALID");
|
||||
} else if (add && selected_nic == "INVALID") {
|
||||
selected_nic = $("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent option:first").val();
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).val(selected_nic);
|
||||
}
|
||||
|
||||
$.each(_nics, function(index, value) {
|
||||
if (value.NAME == ("NIC" + dd_context["nic_id"])) {
|
||||
value.ALIAS = selected_nic;
|
||||
}
|
||||
});
|
||||
|
||||
if (selected_nic && selected_nic != "INVALID") {
|
||||
_hide_remove(that.context);
|
||||
|
||||
$("#provision_accordion_dd_" + dd_context["dd_id"] + "_alias_parent", dd_context).val(selected_nic);
|
||||
}
|
||||
});
|
||||
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent", dd_context).hide();
|
||||
|
||||
$("input[name='provision_accordion_dd_"+provision_nic_accordion_dd_id+"_req_select']", dd_context).on("change", function() {
|
||||
if (this.value == "vnet_select") {
|
||||
$(".net_select",dd_context).show();
|
||||
@ -366,6 +494,10 @@ define(function(require) {
|
||||
Tips.setup(dd_context);
|
||||
Foundation.reInit(context);
|
||||
|
||||
if(options.nic && options.nic.PARENT) {
|
||||
_fill_alias(options.nic.PARENT);
|
||||
}
|
||||
|
||||
provision_nic_accordion_dd_id += 1;
|
||||
|
||||
vnetsTable.initialize();
|
||||
@ -407,6 +539,13 @@ define(function(require) {
|
||||
|
||||
dd_context.on("click", ".provision_remove_nic" , function() {
|
||||
dd_context.remove();
|
||||
|
||||
var index = _nics.findIndex(nic => nic.NAME === ("NIC" + dd_context["nic_id"]));
|
||||
|
||||
_nics.splice(index, 1);
|
||||
|
||||
nicId --;
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
@ -450,7 +589,13 @@ define(function(require) {
|
||||
Foundation.reflow(context, 'accordion');
|
||||
|
||||
$(".provision_add_network_interface", context).on("click", function() {
|
||||
if (!_nics.find(nic => nic.NAME === ("NIC" + nicId))) {
|
||||
_nics.push({"NAME": "NIC" + nicId, "ALIAS": false, "DD_ID": provision_nic_accordion_dd_id});
|
||||
}
|
||||
|
||||
_generate_provision_network_table($(".accordion", context), options);
|
||||
|
||||
nicId ++;
|
||||
});
|
||||
|
||||
if (options.click_add_button == true){
|
||||
@ -493,4 +638,30 @@ define(function(require) {
|
||||
error: Notifier.onError
|
||||
});
|
||||
}
|
||||
|
||||
function _fill_alias(nicname) {
|
||||
$.each(_nics, function(index, value) {
|
||||
if (value.NAME == ("NIC" + nicId)) {
|
||||
value.ALIAS = nicname;
|
||||
}
|
||||
});
|
||||
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_interface_type_section", this.context).show();
|
||||
$("input#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_interface_type", this.context).click();
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent", this.context).show();
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent").empty();
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent").append(new Option(nicname, nicname));
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_alias_parent", this.context).val(nicname);
|
||||
$("#provision_accordion_dd_" + provision_nic_accordion_dd_id + "_network_selection", this.context).hide();
|
||||
}
|
||||
|
||||
function _hide_remove(context) {
|
||||
$.each(_nics, function(index, value) {
|
||||
if (_nics.find(nic => nic.ALIAS === value.NAME)) {
|
||||
$("#remove_nic_" + value.DD_ID, context).hide();
|
||||
} else {
|
||||
$("#remove_nic_" + value.DD_ID, context).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
|
@ -18,23 +18,45 @@
|
||||
<span class="label secondary">{{tr "Select a Network"}} </span>
|
||||
{{/if}}
|
||||
</span>
|
||||
<i class="right fas fa-times-circle remove-tab provision_remove_nic"></i>
|
||||
<i id="remove_nic_{{provision_nic_accordion_dd_id}}" class="right fas fa-times-circle remove-tab provision_remove_nic"></i>
|
||||
</a>
|
||||
<div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}" class="accordion-content nic-section-entry" data-tab-content>
|
||||
<div class="only_template">
|
||||
<div class="row autoContainer">
|
||||
<div class="large-12 large-centered columns">
|
||||
<div class="switch left">
|
||||
<input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_mode" type="checkbox">
|
||||
<label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_mode">
|
||||
</label>
|
||||
</div>
|
||||
<label class="left">
|
||||
|
||||
{{tr "Automatic selection"}}
|
||||
{{{tip (tr "The Schedule will decide which is the bets virtual network")}}}
|
||||
</label>
|
||||
</div>
|
||||
<fieldset id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_interface_type_section">
|
||||
<legend>{{tr "Interface type"}}</legend>
|
||||
<div class="switch left">
|
||||
<input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_interface_type" type="checkbox">
|
||||
<label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_interface_type">
|
||||
</label>
|
||||
</div>
|
||||
<label class="left">
|
||||
|
||||
{{tr "Alias"}}
|
||||
{{{tip (tr "The NIC will be attached as an alias")}}}
|
||||
</label>
|
||||
|
||||
<span id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_no_alias" class="radius warning label">
|
||||
<i class="fas fa-exclamation-triangle"/> {{tr "NIC has alias"}}
|
||||
</span>
|
||||
<select id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_alias_parent" style="width: 200px; margin-left: 5px"></select>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>{{tr "Network selection"}}</legend>
|
||||
<div id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_selection">
|
||||
<div class="switch left">
|
||||
<input class="switch-input" id="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_mode" type="checkbox">
|
||||
<label class="switch-paddle" for="provision_accordion_dd_{{provision_nic_accordion_dd_id}}_network_mode">
|
||||
</label>
|
||||
</div>
|
||||
<label class="left">
|
||||
|
||||
{{tr "Automatic selection"}}
|
||||
{{{tip (tr "The Schedule will decide which is the bets virtual network")}}}
|
||||
</label>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="auto">
|
||||
<fieldset>
|
||||
@ -161,4 +183,4 @@
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
</dd>
|
||||
|
Loading…
x
Reference in New Issue
Block a user