[Kimchi-devel] [PATCH] [Kimchi] Bugfix 804: Disable connect vnc when VM is powered off

Jose Ricardo Ziviani joserz at linux.vnet.ibm.com
Tue Feb 16 13:02:23 UTC 2016


 - When a VM is powered off, the option to connect to its vnc should not
   be displayed under the actions menu otherwise users will get errors.

Signed-off-by: Jose Ricardo Ziviani <joserz at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.guest_main.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.guest_main.js b/ui/js/src/kimchi.guest_main.js
index bfd62a8..83ee3f0 100644
--- a/ui/js/src/kimchi.guest_main.js
+++ b/ui/js/src/kimchi.guest_main.js
@@ -652,7 +652,8 @@ kimchi.createGuestLi = function(vmObject, prevScreenImage, openMenu) {
     var consoleActions = guestActions.find("[name=vm-console]");
     var consoleLinkActions = result.find(".vnc-link");
 
-    if ((vmObject.graphics['type'] == 'vnc') || (vmObject.graphics['type'] == 'spice')) {
+    if (((vmObject.graphics['type'] == 'vnc') || (vmObject.graphics['type'] == 'spice'))
+       && (!vmPoweredOffBool)) {
         consoleActions.on("click", function(event) {
             event.preventDefault();
             kimchi.openVmConsole(event);
-- 
1.9.1




More information about the Kimchi-devel mailing list