public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device
@ 2022-10-10 15:21 Stefan Hrdlicka
  2022-10-10 15:21 ` [pve-devel] [PATCH V2 pve-manager 1/2] " Stefan Hrdlicka
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hrdlicka @ 2022-10-10 15:21 UTC (permalink / raw)
  To: pve-devel


V1 -> V2
* changed to optional chaining


Stefan Hrdlicka (2):
  fix #1981: get next free disk id on change of bus/device
  cleanup: style fix

 www/manager6/form/ControllerSelector.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] [PATCH V2 pve-manager 1/2] fix #1981: get next free disk id on change of bus/device
  2022-10-10 15:21 [pve-devel] [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device Stefan Hrdlicka
@ 2022-10-10 15:21 ` Stefan Hrdlicka
  2022-10-10 15:21 ` [pve-devel] [PATCH V2 pve-manager 2/2] cleanup: style fix Stefan Hrdlicka
  2022-10-24 11:47 ` [pve-devel] applied: [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hrdlicka @ 2022-10-10 15:21 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index d84c49d6..8a52737d 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -12,7 +12,7 @@ Ext.define('PVE.form.ControllerSelector', {
 	let freeId = PVE.Utils.nextFreeDisk(controllers, me.vmconfig);
 
 	if (freeId !== undefined) {
-	    busField.setValue(freeId.controller);
+	    busField?.setValue(freeId.controller);
 	    deviceIDField.setValue(freeId.id);
 	}
     },
@@ -83,6 +83,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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] [PATCH V2 pve-manager 2/2] cleanup: style fix
  2022-10-10 15:21 [pve-devel] [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device Stefan Hrdlicka
  2022-10-10 15:21 ` [pve-devel] [PATCH V2 pve-manager 1/2] " Stefan Hrdlicka
@ 2022-10-10 15:21 ` Stefan Hrdlicka
  2022-10-24 11:47 ` [pve-devel] applied: [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hrdlicka @ 2022-10-10 15:21 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Stefan Hrdlicka <s.hrdlicka@proxmox.com>
---
 www/manager6/form/ControllerSelector.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/form/ControllerSelector.js b/www/manager6/form/ControllerSelector.js
index 8a52737d..d7c2625d 100644
--- a/www/manager6/form/ControllerSelector.js
+++ b/www/manager6/form/ControllerSelector.js
@@ -59,7 +59,7 @@ Ext.define('PVE.form.ControllerSelector', {
     },
 
     initComponent: function() {
-	var me = this;
+	let me = this;
 
 	Ext.apply(me, {
 	    fieldLabel: gettext('Bus/Device'),
-- 
2.30.2





^ permalink raw reply	[flat|nested] 4+ messages in thread

* [pve-devel] applied: [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device
  2022-10-10 15:21 [pve-devel] [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device Stefan Hrdlicka
  2022-10-10 15:21 ` [pve-devel] [PATCH V2 pve-manager 1/2] " Stefan Hrdlicka
  2022-10-10 15:21 ` [pve-devel] [PATCH V2 pve-manager 2/2] cleanup: style fix Stefan Hrdlicka
@ 2022-10-24 11:47 ` Dominik Csapak
  2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2022-10-24 11:47 UTC (permalink / raw)
  To: Proxmox VE development discussion, Stefan Hrdlicka

applied both patches, thanks




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-24 11:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 15:21 [pve-devel] [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device Stefan Hrdlicka
2022-10-10 15:21 ` [pve-devel] [PATCH V2 pve-manager 1/2] " Stefan Hrdlicka
2022-10-10 15:21 ` [pve-devel] [PATCH V2 pve-manager 2/2] cleanup: style fix Stefan Hrdlicka
2022-10-24 11:47 ` [pve-devel] applied: [PATCH V2 pve-manager 0/2] fix #1981: get next free disk id on change of bus/device Dominik Csapak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal