all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH] fix #4585 : toolkit: configid type: add missing "-" character support
@ 2023-03-11 13:02 Alexandre Derumier
  2023-03-11 16:31 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Derumier @ 2023-03-11 13:02 UTC (permalink / raw)
  To: pve-devel

JsonSchema is already ok:
$CONFIGID_RE = qr/[a-z][a-z0-9_-]+/i;

This is blocking creation of snapshot name with "-" in gui.
(works fine command line)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
---
 src/Toolkit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Toolkit.js b/src/Toolkit.js
index 2f4a01a..4314fb4 100644
--- a/src/Toolkit.js
+++ b/src/Toolkit.js
@@ -110,7 +110,7 @@ Ext.apply(Ext.form.field.VTypes, {
 		   gettext("Must end with") + ": 'A-Z', 'a-z', '0-9'<br />",
 
     ConfigId: function(v) {
-        return (/^[a-z][a-z0-9_]+$/i).test(v);
+        return (/^[a-z][a-z0-9_-]+$/i).test(v);
     },
     ConfigIdText: gettext("Allowed characters") + ": 'A-Z', 'a-z', '0-9', '_'<br />" +
 		  gettext("Minimum characters") + ": 2<br />" +
-- 
2.30.2




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

* [pve-devel] applied: [PATCH] fix #4585 : toolkit: configid type: add missing "-" character support
  2023-03-11 13:02 [pve-devel] [PATCH] fix #4585 : toolkit: configid type: add missing "-" character support Alexandre Derumier
@ 2023-03-11 16:31 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2023-03-11 16:31 UTC (permalink / raw)
  To: Proxmox VE development discussion, Alexandre Derumier

Am 11/03/2023 um 14:02 schrieb Alexandre Derumier:
> JsonSchema is already ok:
> $CONFIGID_RE = qr/[a-z][a-z0-9_-]+/i;
> 
> This is blocking creation of snapshot name with "-" in gui.
> (works fine command line)
> 
> Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
> ---
>  src/Toolkit.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!




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

end of thread, other threads:[~2023-03-11 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-11 13:02 [pve-devel] [PATCH] fix #4585 : toolkit: configid type: add missing "-" character support Alexandre Derumier
2023-03-11 16:31 ` [pve-devel] applied: " Thomas Lamprecht

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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal