diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js index 96711d5ff0..02a0169059 100644 --- a/src/sunstone/public/js/plugins/vms-tab.js +++ b/src/sunstone/public/js/plugins/vms-tab.js @@ -49,6 +49,9 @@ var vm_graphs = [ } ]; + +var VNCstates=["RUNNING","SHUTDOWN","SHUTDOWN_POWEROFF","UNKNOWN","HOTPLUG","CANCEL","MIGRATE"]; + //Permanent storage for last value of aggregated network usage //Used to calculate bandwidth var netUsage = { @@ -1581,7 +1584,8 @@ function vncIcon(vm){ var graphics = vm.TEMPLATE.GRAPHICS; var state = OpenNebula.Helper.resource_state("vm_lcm",vm.LCM_STATE); var gr_icon; - if (graphics && graphics.TYPE == "vnc" && state == tr("RUNNING")){ + + if (graphics && graphics.TYPE == "vnc" && $.inArray(state, VNCstates)!=-1){ gr_icon = ''; gr_icon += '\"'+tr("Open'; }