B #5402: Hide Remote connection button when vm not running (#1227)

This commit is contained in:
Frederick Borges authored and GitHub committed 2021-05-19 10:49:11 +02:00
1 parent c9a3f9bc1f
commit 871dedd49f
1 file changed
+8
@@ -327,6 +327,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);