mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-24 22:06:59 +01:00
CA-224724: VBD edit page: show 'position in use' message on the dropdown items
requested changed by code review Signed-off-by: Gabor Apati-Nagy <gabor.apati-nagy@citrix.com>
This commit is contained in:
parent
33c95f5e6f
commit
c0edd4c587
@ -158,23 +158,15 @@ namespace XenAdmin.SettingsPanels
|
||||
if (comboBoxItemWithVdi != null)
|
||||
{
|
||||
devicePositionComboBox.Items.Add(comboBoxItemWithVdi);
|
||||
|
||||
if (vbd != null && comboBoxItemWithVdi.VBD.userdevice == vbd.userdevice)
|
||||
devicePositionComboBox.SelectedItem = comboBoxItemWithVdi;
|
||||
}
|
||||
else
|
||||
{
|
||||
devicePositionComboBox.Items.Add(new DevicePositionComboBoxItem(devicePosition));
|
||||
}
|
||||
}
|
||||
|
||||
// Make sure the userdevice for the selected VBD is the one selected in the combobox
|
||||
foreach (DevicePositionComboBoxItem item in devicePositionComboBox.Items)
|
||||
{
|
||||
if (item.VBD != null && item.VBD.userdevice == vbd.userdevice)
|
||||
{
|
||||
devicePositionComboBox.SelectedItem = item;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user