1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-19 06:50:07 +03:00

M #-: Fix RDP 1 nic (#4315)

Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
This commit is contained in:
Tino Vázquez 2020-03-05 17:48:49 +01:00 committed by GitHub
parent 0dad03df8c
commit 363e3f1b56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -873,13 +873,16 @@ define(function(require) {
// returns true if the RDP button should be enabled
function isRDPSupported(element) {
return ( element.TEMPLATE &&
element.TEMPLATE.NIC &&
Array.isArray(element.TEMPLATE.NIC) &&
element.TEMPLATE.NIC.some(function(nic) {
return nic.RDP && nic.RDP == "YES"
})
);
var rtn = false;
if(element.TEMPLATE && element.TEMPLATE.NIC){
if(!Array.isArray(element.TEMPLATE.NIC)){
element.TEMPLATE.NIC = [element.TEMPLATE.NIC];
}
element.TEMPLATE.NIC.some(function(nic) {
rtn = nic.RDP && nic.RDP == "YES"
})
}
return rtn;
}
return VM;