The user could not create DVD from the Console TabPage while the same operation was possible from the VmStorage TabPage.

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-11-01 01:17:52 +00:00
parent 6f1daff1fc
commit e28aa63aa5

View File

@ -1291,10 +1291,12 @@ namespace XenAdmin.ConsoleView
{
toggleConsoleButton.Enabled = false;
VBD cddrive = source.FindVMCDROM();
bool allowEject = cddrive != null ? cddrive.allowed_operations.Contains(vbd_operations.eject) : false;
bool allowInsert = cddrive != null ? cddrive.allowed_operations.Contains(vbd_operations.insert) : false;
multipleDvdIsoList1.Enabled = (source.power_state == vm_power_state.Halted) && (allowEject || allowInsert);
VBD cdDrive = source.FindVMCDROM();
multipleDvdIsoList1.Enabled = cdDrive == null ||
source.power_state == vm_power_state.Halted &&
(cdDrive.allowed_operations.Contains(vbd_operations.eject) ||
cdDrive.allowed_operations.Contains(vbd_operations.insert));
sendCAD.Enabled = false;
}