[pve-devel] [PATCH manager 1/3] ui: pool members: avoid setting request parameter for all edit windows

Friedrich Weber f.weber at proxmox.com
Wed Apr 3 11:10:08 CEST 2024


Currently, after adding a storage to a pool, opening any edit window
will send a GET request with a superfluous `poolid` parameter and
cause a parameter verification error in the GUI. This breaks all edit
windows of the current session. A workaround is to reload the current
browser session.

This happens because the `PVE.pool.AddStorage` component inadvertently
adds `poolid` to an `extraRequestParams` object that is shared by all
instances of `Proxmox.window.Edit`, affecting all edit windows in the
current session. Fix this by instead creating a new object that is
local to the component.

Fixes: cd731902b7a724b1ab747276f9c6343734f1d8cb
Signed-off-by: Friedrich Weber <f.weber at proxmox.com>
---

Notes:
    changes since v1:
    - remove unnecessary quotes (thx Stefan)

 www/manager6/grid/PoolMembers.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMembers.js
index 75f20cab..af6af1bd 100644
--- a/www/manager6/grid/PoolMembers.js
+++ b/www/manager6/grid/PoolMembers.js
@@ -123,7 +123,7 @@ Ext.define('PVE.pool.AddStorage', {
 	me.isAdd = true;
 	me.url = "/pools/";
 	me.method = 'PUT';
-	me.extraRequestParams.poolid = me.pool;
+	me.extraRequestParams = { poolid: me.pool };
 
 	Ext.apply(me, {
 	    subject: gettext('Storage'),
-- 
2.39.2





More information about the pve-devel mailing list