diff --git a/src/sunstone/etc/sunstone-views/vcenter.yaml b/src/sunstone/etc/sunstone-views/vcenter.yaml index f633ce4a6e..890f827153 100644 --- a/src/sunstone/etc/sunstone-views/vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter.yaml @@ -111,7 +111,7 @@ tabs: vm_info_tab: true vm_capacity_tab: true vm_hotplugging_tab: false - vm_network_tab: false + vm_network_tab: true vm_snapshot_tab: true vm_placement_tab: true vm_actions_tab: true diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 6833005b07..1052380569 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -30,6 +30,14 @@ function loadVNC(){ } loadVNC(); +function calculate_isHybrid(vm_info){ + return vm_info.USER_TEMPLATE.HYPERVISOR && + (vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() == "vcenter" + || vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() == "ec2" + || vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() == "azure" + || vm_info.USER_TEMPLATE.HYPERVISOR.toLowerCase() == "softlayer") +} + var VNCstates=[ tr("RUNNING"), tr("SHUTDOWN"), @@ -968,7 +976,9 @@ function str_start_time(vm){ // Return the IP or several IPs of a VM function ip_str(vm){ - if (vm.USER_TEMPLATE.HYPERVISOR) + var isHybrid = calculate_isHybrid(vm); + + if (isHybrid) { switch(vm.USER_TEMPLATE.HYPERVISOR.toLowerCase()) { @@ -2078,6 +2088,9 @@ function hotpluggingOps(){ } function printNics(vm_info){ + + var isHybrid = calculate_isHybrid(vm_info); + var html ='