[pve-devel] [PATCH pve-manager 1/2] fix #1981: get next free disk id on change of bus/device
Stefan Hrdlicka
s.hrdlicka at proxmox.com
Wed Sep 28 11:37:55 CEST 2022
Signed-off-by: Stefan Hrdlicka <s.hrdlicka at proxmox.com>
---
FYI: When IDE already has 4 devices and the user tries to add another one,
the number device number isn't changed since there isn't any space
left.
www/manager6/form/ControllerSelector.js | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index d84c49d6..6daede95 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -12,7 +12,9 @@ Ext.define('PVE.form.ControllerSelector', {
let freeId = PVE.Utils.nextFreeDisk(controllers, me.vmconfig);
if (freeId !== undefined) {
- busField.setValue(freeId.controller);
+ if (busField !== undefined) {
+ busField.setValue(freeId.controller);
+ }
deviceIDField.setValue(freeId.id);
}
},
@@ -83,6 +85,7 @@ Ext.define('PVE.form.ControllerSelector', {
return;
}
let field = me.down('field[name=deviceid]');
+ me.setToFree([value], undefined, field);
field.setMaxValue(PVE.Utils.diskControllerMaxIDs[value] - 1);
field.validate();
},
--
2.30.2
More information about the pve-devel
mailing list