mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Feature #4620: Show PCI IPs in the vms table
This commit is contained in:
parent
94e0b4bd91
commit
5178c31268
@ -675,6 +675,7 @@ define(function(require) {
|
||||
function ipsStr(element, divider) {
|
||||
var divider = divider || "<br>"
|
||||
var nic = element.TEMPLATE.NIC;
|
||||
var pci = element.TEMPLATE.PCI;
|
||||
var ips = [];
|
||||
|
||||
var monitoring = element.MONITORING;
|
||||
@ -695,21 +696,35 @@ define(function(require) {
|
||||
})
|
||||
}
|
||||
|
||||
if (nic == undefined){
|
||||
nic = [];
|
||||
}
|
||||
|
||||
if (!$.isArray(nic)) {
|
||||
nic = [nic];
|
||||
}
|
||||
|
||||
if (pci != undefined) {
|
||||
if (!$.isArray(pci)) {
|
||||
pci = [pci];
|
||||
}
|
||||
|
||||
$.each(pci, function(){
|
||||
if (this["TYPE"] == "NIC"){
|
||||
nic.push(this);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(ips.length==0)
|
||||
{
|
||||
if (nic != undefined) {
|
||||
if (!$.isArray(nic)) {
|
||||
nic = [nic];
|
||||
}
|
||||
|
||||
$.each(nic, function(index, value) {
|
||||
$.each(NIC_IP_ATTRS, function(j, attr){
|
||||
if (value[attr]) {
|
||||
ips.push(value[attr]);
|
||||
}
|
||||
});
|
||||
$.each(nic, function(index, value) {
|
||||
$.each(NIC_IP_ATTRS, function(j, attr){
|
||||
if (value[attr]) {
|
||||
ips.push(value[attr]);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (ips.length > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user