public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] ui: clone: validate name
@ 2023-04-17  7:09 Fiona Ebner
  2023-04-17  7:09 ` [pve-devel] [PATCH manager 2/2] ui: backup restore: " Fiona Ebner
  2023-04-24 10:10 ` [pve-devel] applied-series: [PATCH manager 1/2] ui: clone: " Thomas Lamprecht
  0 siblings, 2 replies; 3+ messages in thread
From: Fiona Ebner @ 2023-04-17  7:09 UTC (permalink / raw)
  To: pve-devel

As reported in the community forum[0], as opposed to VM/LXC creation,
there is no validation for the name in the clone dialog. Use the same
validation as the guest creation wizards do to catch errors early,
before sending the API request.

[0]: https://forum.proxmox.com/threads/125883/#post-549304

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/manager6/window/Clone.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/manager6/window/Clone.js b/www/manager6/window/Clone.js
index e94cd92d..e4ea17ad 100644
--- a/www/manager6/window/Clone.js
+++ b/www/manager6/window/Clone.js
@@ -191,6 +191,7 @@ Ext.define('PVE.window.Clone', {
 	{
 	    xtype: 'textfield',
 	    name: 'name',
+	    vtype: 'DnsName',
 	    allowBlank: true,
 	    fieldLabel: me.guestType === 'lxc' ? gettext('Hostname') : gettext('Name'),
 	},
-- 
2.30.2





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

* [pve-devel] [PATCH manager 2/2] ui: backup restore: validate name
  2023-04-17  7:09 [pve-devel] [PATCH manager 1/2] ui: clone: validate name Fiona Ebner
@ 2023-04-17  7:09 ` Fiona Ebner
  2023-04-24 10:10 ` [pve-devel] applied-series: [PATCH manager 1/2] ui: clone: " Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Fiona Ebner @ 2023-04-17  7:09 UTC (permalink / raw)
  To: pve-devel

Use the same validation as the guest creation wizards do to catch
errors early, before sending the API request.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/manager6/window/Restore.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
index 7d9d57bf..36aecc39 100644
--- a/www/manager6/window/Restore.js
+++ b/www/manager6/window/Restore.js
@@ -315,6 +315,7 @@ Ext.define('PVE.window.Restore', {
 			xtype: 'textfield',
 			fieldLabel: me.vmtype === 'lxc' ? gettext('Hostname') : gettext('Name'),
 			name: 'name',
+			vtype: 'DnsName',
 			reference: 'nameField',
 			allowBlank: true,
 		    }, {
-- 
2.30.2





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

* [pve-devel] applied-series: [PATCH manager 1/2] ui: clone: validate name
  2023-04-17  7:09 [pve-devel] [PATCH manager 1/2] ui: clone: validate name Fiona Ebner
  2023-04-17  7:09 ` [pve-devel] [PATCH manager 2/2] ui: backup restore: " Fiona Ebner
@ 2023-04-24 10:10 ` Thomas Lamprecht
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2023-04-24 10:10 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fiona Ebner

On 17/04/2023 09:09, Fiona Ebner wrote:
> As reported in the community forum[0], as opposed to VM/LXC creation,
> there is no validation for the name in the clone dialog. Use the same
> validation as the guest creation wizards do to catch errors early,
> before sending the API request.
> 
> [0]: https://forum.proxmox.com/threads/125883/#post-549304
> 
> Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
> ---
>  www/manager6/window/Clone.js | 1 +
>  1 file changed, 1 insertion(+)
> 
>

applied both patches, thanks!




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

end of thread, other threads:[~2023-04-24 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-17  7:09 [pve-devel] [PATCH manager 1/2] ui: clone: validate name Fiona Ebner
2023-04-17  7:09 ` [pve-devel] [PATCH manager 2/2] ui: backup restore: " Fiona Ebner
2023-04-24 10:10 ` [pve-devel] applied-series: [PATCH manager 1/2] ui: clone: " 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