From 16e029fa51bcd6411c5da87796f648d8b6c26120 Mon Sep 17 00:00:00 2001 From: Frederick Borges Date: Wed, 19 May 2021 10:49:11 +0200 Subject: [PATCH] B #5402: Hide Remote connection button when vm not running (#1227) (cherry picked from commit 871dedd49fce00bfb0a34409b06f6496060a8a77) --- src/sunstone/public/app/tabs/provision-tab/vms/list.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sunstone/public/app/tabs/provision-tab/vms/list.js b/src/sunstone/public/app/tabs/provision-tab/vms/list.js index eb1e56bcdd..231a7e0b89 100644 --- a/src/sunstone/public/app/tabs/provision-tab/vms/list.js +++ b/src/sunstone/public/app/tabs/provision-tab/vms/list.js @@ -326,6 +326,14 @@ define(function(require) { $(".provision_rdp_button", context).toggle(Boolean(OpenNebulaVM.isConnectionSupported(data, 'rdp'))); $(".provision_wfile_button", context).toggle(Boolean(OpenNebulaVM.isWFileSupported(data))); + + var state = get_provision_vm_state(data); + if (state.str === "RUNNING") { + $('.dropdown-menu-css', context).show(); + } + else { + $('.dropdown-menu-css', context).hide(); + } var is_vnc_allowed = OpenNebulaVM.isVNCSupported(data); var is_spice_allowed = OpenNebulaVM.isSPICESupported(data);