1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-12 09:17:41 +03:00

B #5002: Disable remote actions until monitoring (#864)

Signed-off-by: Frederick Borges <fborges@opennebula.io>
This commit is contained in:
Frederick Borges 2021-02-23 19:13:10 +01:00 committed by GitHub
parent 37d49c48bb
commit 9cf6ccfcab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,7 @@ define(function(require) {
var isVNCSupported = Boolean(OpenNebulaVM.isVNCSupported(element)),
isSPICESupported = Boolean(OpenNebulaVM.isSPICESupported(element)),
isWMRCSupported = Boolean(OpenNebulaVM.isVMRCSupported(element)),
isVMRCSupported = Boolean(OpenNebulaVM.isVMRCSupported(element)),
isWFileSupported = Boolean(OpenNebulaVM.isWFileSupported(element)),
isRDPSupported = Boolean(OpenNebulaVM.isConnectionSupported(element, 'rdp')),
isSSHSupported = Boolean(OpenNebulaVM.isConnectionSupported(element, 'ssh'));
@ -53,7 +53,7 @@ define(function(require) {
var allDisabled = (
!isVNCSupported &&
!isSPICESupported &&
!isWMRCSupported &&
!isVMRCSupported &&
!isWFileSupported &&
!isRDPSupported &&
!isSSHSupported
@ -78,6 +78,16 @@ define(function(require) {
vncAndSpiceController();
$("#vmsremote_buttons").toggle(!allDisabled);
if (element && element.TEMPLATE && element.TEMPLATE.TM_MAD_SYSTEM && element.TEMPLATE.TM_MAD_SYSTEM === "vcenter"){
var monitored = element.MONITORING && element.MONITORING.VCENTER_ESX_HOST;
if (monitored && !allDisabled) {
$("#vmsremote_buttons").show();
}
else{
$("#vmsremote_buttons").hide();
}
}
if (isVNCSupported) {
$(".vnc-sunstone-info").show();
@ -121,8 +131,8 @@ define(function(require) {
var show_fireedge_buttons = function() {
$(".vnc-button").hide();
$(".vmrc-button").toggle(isWMRCSupported);
$(".guac-button").toggle(!isWMRCSupported);
$(".vmrc-button").toggle(isVMRCSupported);
$(".guac-button").toggle(!isVMRCSupported);
}
var show_buttons = function(fireedgeToken) {