From 4b819625b9b2fe5bcaedeb77506ef1d67ecdcac1 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Wed, 11 Feb 2015 19:01:15 +0100 Subject: [PATCH] Fix showing hybrid VMs in sunstone --- src/sunstone/public/js/plugins/vms-tab.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 7f465e8eb4..a68daebee9 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -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){ '; // 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 += '\
\