B #5707: Hide remote console options not available (#1807)

(cherry picked from commit 65e66ddad4)
This commit is contained in:
Frederick Borges authored and Tino Vazquez committed 2022-02-23 19:17:59 +01:00
1 parent ba5db04bb3
commit fb72a57401
1 file changed
+7 -2
+7 -2
View File
@@ -1255,6 +1255,11 @@ define(function(require) {
String(element.USER_TEMPLATE.HYPERVISOR).toLowerCase() === "vcenter");
}
function isKVMVM(element = {}){
return Boolean(element.USER_TEMPLATE &&
String(element.USER_TEMPLATE.HYPERVISOR).toLowerCase() === "kvm");
}
function isVMRCSupported(element = {}) {
var actionEnabled = Config.isTabActionEnabled("vms-tab", "VM.startvmrc");
var vmrcSupported = graphicSupported(element, "vnc");
@@ -1274,9 +1279,9 @@ define(function(require) {
var actionEnabled = Config.isTabActionEnabled("vms-tab", "VM.save_virt_viewer");
var vncSupported = graphicSupported(element, "vnc");
var spiceSupported = graphicSupported(element, "spice");
var isvCenterVM = isVCenterVM(element);
var isKVM = isKVMVM(element);
return (actionEnabled && history && (vncSupported || spiceSupported) && !isvCenterVM)
return (actionEnabled && history && (vncSupported || spiceSupported) && isKVM)
? {
hostname: history.HOSTNAME,
type: element.TEMPLATE.GRAPHICS.TYPE.toLowerCase(),