From: Friedrich Weber <f.weber@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager 1/3] ui: pool members: avoid setting request parameter for all edit windows
Date: Wed, 3 Apr 2024 11:10:08 +0200 [thread overview]
Message-ID: <20240403091010.11544-2-f.weber@proxmox.com> (raw)
In-Reply-To: <20240403091010.11544-1-f.weber@proxmox.com>
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@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
next prev parent reply other threads:[~2024-04-03 9:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 9:10 [pve-devel] [PATCH manager/widget-toolkit 0/3] ui: avoid UI bugs due to shared extra request params Friedrich Weber
2024-04-03 9:10 ` Friedrich Weber [this message]
2024-04-03 9:10 ` [pve-devel] [PATCH manager 2/3] ui: pool members: avoid sharing object for extra request parameters Friedrich Weber
2024-04-03 9:10 ` [pve-devel] [PATCH widget-toolkit 3/3] window: edit: avoid shared object for extra request params Friedrich Weber
2024-04-04 8:22 ` Stefan Sterz
2024-04-04 9:01 ` Friedrich Weber
2024-04-04 9:23 ` Stefan Sterz
2024-04-04 10:10 ` Friedrich Weber
2024-04-04 10:54 ` Stefan Sterz
2024-04-04 11:04 ` Stefan Sterz
2024-04-04 10:59 ` Thomas Lamprecht
2024-04-04 11:28 ` Friedrich Weber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240403091010.11544-2-f.weber@proxmox.com \
--to=f.weber@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.