1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

B #3101: multiple entries conf VM (#3397)

Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
(cherry picked from commit e329d31e21424d304b1e0c1d21b37686c8bee3f3)
This commit is contained in:
Jorge Lobo 2019-06-03 17:24:01 +02:00 committed by Tino Vazquez
parent 096537ef53
commit bb22f4debb
No known key found for this signature in database
GPG Key ID: 2FE9C32E94AEABBE

View File

@ -146,7 +146,7 @@ define(function(require) {
this.wizardTabId = WIZARD_TAB_ID + UniqueId.id();
this.icon = "fa-power-off";
this.title = Locale.tr("OS & CPU");
this.classes = "hypervisor"
this.classes = "hypervisor";
this.kernelFilesTable = new FilesTable(
this.wizardTabId + UniqueId.id(),
@ -447,16 +447,19 @@ define(function(require) {
nics = [nics];
}
$.each(nics, function(i, nic){
var distinct = function(value, index, self){
return self.indexOf(value)===index;
};
nics = nics.filter(distinct);
nics.map(function(nic,i){
var label = "<i class=\"fas fa-fw fa-lg fa-globe\"></i> ";
if (nic.NETWORK !== undefined){
if (nic && nic.NETWORK && nic.NETWORK !== undefined){
label += nic.NETWORK;
} else if (nic.NETWORK_ID !== undefined){
label += Locale.tr("Network ID") + " " + nic.NETWORK_ID;
} else {
label += Locale.tr("Manual settings");
}
_addBootRow(context, "nic"+i, label);
});
}