Fix showing hybrid VMs in sunstone

This commit is contained in:
Javi Fontan committed 2015-02-11 19:01:15 +01:00
1 parent c5fb52f791
commit 4b819625b9
1 file changed
+4 -2
+4 -2
View File
@@ -2030,7 +2030,8 @@ function printNics(vm_info){
var isHybrid = calculate_isHybrid(vm_info);
// vCenter has network capabilities
if (vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() == "vcenter")
if (vm_info.USER_TEMPLATE.HYPERVISOR &&
vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() == "vcenter")
{
isHybrid = false;
}
@@ -2161,7 +2162,8 @@ function printNics(vm_info){
</div>';
// Do not show statistics for not hypervisors that do not gather net data
if (!isHybrid && vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() != "vcenter")
if (!isHybrid && vm_info.USER_TEMPLATE.HYPERVISOR &&
vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() != "vcenter")
{
html += '\
<div class="row">\