* [PATCH manager] fix #5608: ui: resource mappings: validate the name like the API does
@ 2026-09-29 14:13 Michal Fox
2026-09-30 10:27 ` applied: " Dominik Csapak
0 siblings, 1 reply; 2+ messages in thread
From: Michal Fox @ 2026-09-29 14:13 UTC (permalink / raw)
To: pve-devel
The API only accepts resource mapping IDs in the 'pve-configid' format,
but the name field of the PCI, USB and directory mapping windows takes
any value. A name like 'gpu@node1' is thus only rejected after
submitting, with a generic "invalid configuration ID" error that does
not tell which characters are allowed.
Use the existing 'ConfigId' vtype, so the field is marked invalid right
away and its tooltip lists the allowed characters.
Signed-off-by: Michal Fox <me@dualfroz.com>
---
www/manager6/window/DirMapEdit.js | 1 +
www/manager6/window/PCIMapEdit.js | 1 +
www/manager6/window/USBMapEdit.js | 1 +
3 files changed, 3 insertions(+)
diff --git a/www/manager6/window/DirMapEdit.js b/www/manager6/window/DirMapEdit.js
index 841ff1fe..bc6a7d03 100644
--- a/www/manager6/window/DirMapEdit.js
+++ b/www/manager6/window/DirMapEdit.js
@@ -142,6 +142,7 @@ Ext.define('PVE.window.DirMapEditWindow', {
},
name: 'name',
allowBlank: false,
+ vtype: 'ConfigId',
},
{
xtype: 'pveNodeSelector',
diff --git a/www/manager6/window/PCIMapEdit.js b/www/manager6/window/PCIMapEdit.js
index 625f4ad4..28aa4772 100644
--- a/www/manager6/window/PCIMapEdit.js
+++ b/www/manager6/window/PCIMapEdit.js
@@ -217,6 +217,7 @@ Ext.define('PVE.window.PCIMapEditWindow', {
},
name: 'id',
allowBlank: false,
+ vtype: 'ConfigId',
},
{
xtype: 'displayfield',
diff --git a/www/manager6/window/USBMapEdit.js b/www/manager6/window/USBMapEdit.js
index 5c90ea3b..ba5e2c60 100644
--- a/www/manager6/window/USBMapEdit.js
+++ b/www/manager6/window/USBMapEdit.js
@@ -153,6 +153,7 @@ Ext.define('PVE.window.USBMapEditWindow', {
},
name: 'name',
allowBlank: false,
+ vtype: 'ConfigId',
},
{
xtype: 'displayfield',
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* applied: [PATCH manager] fix #5608: ui: resource mappings: validate the name like the API does
2026-09-29 14:13 [PATCH manager] fix #5608: ui: resource mappings: validate the name like the API does Michal Fox
@ 2026-09-30 10:27 ` Dominik Csapak
0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2026-09-30 10:27 UTC (permalink / raw)
To: pve-devel, Michal Fox
On Tue, 29 Sep 2026 16:13:13 +0200, Michal Fox wrote:
> The API only accepts resource mapping IDs in the 'pve-configid' format,
> but the name field of the PCI, USB and directory mapping windows takes
> any value. A name like 'gpu@node1' is thus only rejected after
> submitting, with a generic "invalid configuration ID" error that does
> not tell which characters are allowed.
>
> Use the existing 'ConfigId' vtype, so the field is marked invalid right
> away and its tooltip lists the allowed characters.
>
> [...]
Applied, thanks!
[1/1] fix #5608: ui: resource mappings: validate the name like the API does
commit: 55c76c27465287eccef01d16f26ff1d6fe37569a
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-30 10:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29 14:13 [PATCH manager] fix #5608: ui: resource mappings: validate the name like the API does Michal Fox
2026-09-30 10:27 ` applied: " Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox