mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
parent
0cd48a7aff
commit
4fc6623a64
@ -333,6 +333,8 @@ define(function(require) {
|
||||
var is_spice_allowed = OpenNebulaVM.isSPICESupported(data);
|
||||
var is_vmrc_allowed = OpenNebulaVM.isVMRCSupported(data);
|
||||
var is_virt_viewer_allowed = OpenNebulaVM.isWFileSupported(data);
|
||||
var is_rdp_allowed = Boolean(OpenNebulaVM.isConnectionSupported(data, 'rdp'));
|
||||
var is_ssh_allowed = Boolean(OpenNebulaVM.isConnectionSupported(data, 'ssh'));
|
||||
|
||||
$('.dropdown-menu-css', context).toggle(state.str === "RUNNING");
|
||||
$(".provision_spice_button", context).parent().toggle(is_spice_allowed);
|
||||
@ -348,8 +350,8 @@ define(function(require) {
|
||||
}else { // Guacamole connections
|
||||
$(".provision_vmrc_button", context).parent().hide();
|
||||
$(".provision_guac_vnc_button", context).parent().show();
|
||||
$(".provision_guac_rdp_button", context).parent().show();
|
||||
$(".provision_guac_ssh_button", context).parent().show();
|
||||
$(".provision_guac_rdp_button", context).parent().toggle(is_rdp_allowed);
|
||||
$(".provision_guac_ssh_button", context).parent().toggle(is_ssh_allowed);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -228,19 +228,19 @@ define(function(require) {
|
||||
type: "action",
|
||||
text: '<div class="remote-logo-dropdown"><img src="images/remote_console/guacamole-alt.png"/></div>' + Locale.tr("VNC"),
|
||||
layout: "vmsremote_buttons",
|
||||
custom_classes: "only-sunstone-info vnc-sunstone-info guac-button"
|
||||
custom_classes: "only-sunstone-info vnc-sunstone-info guac-button guac-vnc-button"
|
||||
},
|
||||
"VM.guac_ssh" : {
|
||||
type: "action",
|
||||
text: '<div class="remote-logo-dropdown"><img src="images/remote_console/guacamole-alt.png"/></div>' + Locale.tr("SSH"),
|
||||
layout: "vmsremote_buttons",
|
||||
custom_classes: "only-sunstone-info ssh-sunstone-info guac-button"
|
||||
custom_classes: "only-sunstone-info ssh-sunstone-info guac-button guac-ssh-button"
|
||||
},
|
||||
"VM.guac_rdp" : {
|
||||
type: "action",
|
||||
text: '<div class="remote-logo-dropdown"><img src="images/remote_console/guacamole-alt.png"/></div>' + Locale.tr("RDP"),
|
||||
layout: "vmsremote_buttons",
|
||||
custom_classes: "only-sunstone-info rdp-sunstone-info guac-button"
|
||||
custom_classes: "only-sunstone-info rdp-sunstone-info guac-button guac-rdp-button"
|
||||
},
|
||||
"VM.save_rdp" : {
|
||||
type: "action",
|
||||
|
@ -75,6 +75,11 @@ define(function(require) {
|
||||
}
|
||||
}
|
||||
|
||||
var sshAndRdpController = function(){
|
||||
$('.rdp-guac-button').toggle(isRDPSupported);
|
||||
$('.ssh-guac-button').toggle(isSSHSupported);
|
||||
}
|
||||
|
||||
vncAndSpiceController();
|
||||
|
||||
$("#vmsremote_buttons").toggle(!allDisabled);
|
||||
@ -88,20 +93,6 @@ define(function(require) {
|
||||
$("#vmsremote_buttons").hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (isVNCSupported) {
|
||||
$(".vnc-sunstone-info").show();
|
||||
$(".spice-sunstone-info").hide();
|
||||
|
||||
}
|
||||
else if (isSPICESupported) {
|
||||
$(".spice-sunstone-info").show();
|
||||
$(".vnc-sunstone-info").hide();
|
||||
}
|
||||
else {
|
||||
$(".spice-sunstone-info").hide();
|
||||
$(".vnc-sunstone-info").hide();
|
||||
}
|
||||
|
||||
// Show / hide virt-viewer button
|
||||
$(".vv-sunstone-info").toggle(!!isWFileSupported);
|
||||
@ -132,7 +123,8 @@ define(function(require) {
|
||||
var show_fireedge_buttons = function() {
|
||||
$(".vnc-button").hide();
|
||||
$(".vmrc-button").toggle(isVMRCSupported);
|
||||
$(".guac-button").toggle(!isVMRCSupported);
|
||||
$(".vnc-guac-button").toggle(isVNCSupported);
|
||||
sshAndRdpController();
|
||||
}
|
||||
|
||||
var show_buttons = function(fireedgeToken) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user