public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window
@ 2023-03-21  9:16 Dominik Csapak
  2023-03-21  9:16 ` [pve-devel] [PATCH manager 2/2] ui: lvmthin: fix not being able to edit the storage Dominik Csapak
  2023-03-21  9:31 ` [pve-devel] applied: [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Dominik Csapak @ 2023-03-21  9:16 UTC (permalink / raw)
  To: pve-devel

seemingly an empty array is special for extjs, and if we push into it,
we overwrite the class definition of that property

this does not happen when something is already in the array, so
the other edit windows work as expected

to fix it here, remove the empty array entirely, since we already
create an empty one when we need it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/storage/LvmThinEdit.js | 2 --
 1 file changed, 2 deletions(-)

diff --git a/www/manager6/storage/LvmThinEdit.js b/www/manager6/storage/LvmThinEdit.js
index bed5facb3..c3b55d87d 100644
--- a/www/manager6/storage/LvmThinEdit.js
+++ b/www/manager6/storage/LvmThinEdit.js
@@ -183,6 +183,4 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
 	    allowBlank: false,
 	},
     ],
-
-    column2: [],
 });
-- 
2.30.2





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

* [pve-devel] [PATCH manager 2/2] ui: lvmthin: fix not being able to edit the storage
  2023-03-21  9:16 [pve-devel] [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window Dominik Csapak
@ 2023-03-21  9:16 ` Dominik Csapak
  2023-03-21  9:37   ` [pve-devel] applied: " Thomas Lamprecht
  2023-03-21  9:31 ` [pve-devel] applied: [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window Thomas Lamprecht
  1 sibling, 1 reply; 4+ messages in thread
From: Dominik Csapak @ 2023-03-21  9:16 UTC (permalink / raw)
  To: pve-devel

the change handler of the edit config from a displayeditfield still
triggers, even if not shown/disabled. sadly this enabled another
editconfig part of a displayeditfield, which triggers an error
in the api

to fix that, simply check if this field is disabled before setting
the other fields value

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 www/manager6/storage/LvmThinEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/storage/LvmThinEdit.js b/www/manager6/storage/LvmThinEdit.js
index c3b55d87d..63f1fd78f 100644
--- a/www/manager6/storage/LvmThinEdit.js
+++ b/www/manager6/storage/LvmThinEdit.js
@@ -148,7 +148,7 @@ Ext.define('PVE.storage.LvmThinInputPanel', {
 		    },
 		    change: function(f, value) {
 			let vgField = this.up('inputpanel').lookup('thinPoolSelector');
-			if (vgField) {
+			if (vgField && !f.isDisabled()) {
 			    vgField.setDisabled(!value);
 			    vgField.setVG(value);
 			    vgField.setValue('');
-- 
2.30.2





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

* [pve-devel] applied: [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window
  2023-03-21  9:16 [pve-devel] [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window Dominik Csapak
  2023-03-21  9:16 ` [pve-devel] [PATCH manager 2/2] ui: lvmthin: fix not being able to edit the storage Dominik Csapak
@ 2023-03-21  9:31 ` Thomas Lamprecht
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-03-21  9:31 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 21/03/2023 um 10:16 schrieb Dominik Csapak:
> seemingly an empty array is special for extjs, and if we push into it,
> we overwrite the class definition of that property
> 
> this does not happen when something is already in the array, so
> the other edit windows work as expected
> 
> to fix it here, remove the empty array entirely, since we already
> create an empty one when we need it
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  www/manager6/storage/LvmThinEdit.js | 2 --
>  1 file changed, 2 deletions(-)
> 
>

applied, thanks!




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

* [pve-devel] applied: [PATCH manager 2/2] ui: lvmthin: fix not being able to edit the storage
  2023-03-21  9:16 ` [pve-devel] [PATCH manager 2/2] ui: lvmthin: fix not being able to edit the storage Dominik Csapak
@ 2023-03-21  9:37   ` Thomas Lamprecht
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2023-03-21  9:37 UTC (permalink / raw)
  To: Proxmox VE development discussion, Dominik Csapak

Am 21/03/2023 um 10:16 schrieb Dominik Csapak:
> the change handler of the edit config from a displayeditfield still
> triggers, even if not shown/disabled. sadly this enabled another
> editconfig part of a displayeditfield, which triggers an error
> in the api
> 
> to fix that, simply check if this field is disabled before setting
> the other fields value
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  www/manager6/storage/LvmThinEdit.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied,  thanks!




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

end of thread, other threads:[~2023-03-21  9:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-21  9:16 [pve-devel] [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window Dominik Csapak
2023-03-21  9:16 ` [pve-devel] [PATCH manager 2/2] ui: lvmthin: fix not being able to edit the storage Dominik Csapak
2023-03-21  9:37   ` [pve-devel] applied: " Thomas Lamprecht
2023-03-21  9:31 ` [pve-devel] applied: [PATCH manager 1/2] ui: lvmthin: don't add nodeselector/enable multiple times in edit window Thomas Lamprecht

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