public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset
@ 2022-04-28  7:04 Fabian Ebner
  2022-04-28  7:04 ` [pve-devel] [PATCH manager 2/2] ui: restore: display "Hostname" for container Fabian Ebner
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Fabian Ebner @ 2022-04-28  7:04 UTC (permalink / raw)
  To: pve-devel

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
---
 www/manager6/window/Restore.js | 86 ++++++++++++++++++----------------
 1 file changed, 45 insertions(+), 41 deletions(-)

diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
index 2d78eb56..9f52c872 100644
--- a/www/manager6/window/Restore.js
+++ b/www/manager6/window/Restore.js
@@ -293,48 +293,52 @@ Ext.define('PVE.window.Restore', {
 	    });
 	}
 
-	items.push(
-	    {
-		xtype: 'displayfield',
-		value: `${gettext('Override Settings')}:`,
-	    },
-	    {
-		xtype: 'textfield',
-		fieldLabel: gettext('Name'),
-		name: 'name',
-		reference: 'nameField',
-		allowBlank: true,
-	    },
-	    {
-		xtype: 'pveMemoryField',
-		fieldLabel: gettext('Memory'),
-		name: 'memory',
-		reference: 'memoryField',
-		value: '',
-		allowBlank: true,
+	items.push({
+	    xtype: 'fieldset',
+	    title: `${gettext('Override Settings')}:`,
+	    layout: 'column',
+	    defaults: {
+		width: '45%',
+		margin: '0 0 5 10',
 	    },
-	    {
-		xtype: 'proxmoxintegerfield',
-		fieldLabel: gettext('Cores'),
-		name: 'cores',
-		reference: 'coresField',
-		minValue: 1,
-		maxValue: 128,
-		allowBlank: true,
-	    },
-	);
-
-	if (me.vmtype === 'qemu') {
-	    items.push({
-		xtype: 'proxmoxintegerfield',
-		fieldLabel: gettext('Sockets'),
-		name: 'sockets',
-		reference: 'socketsField',
-		minValue: 1,
-		maxValue: 4,
-		allowBlank: true,
-	    });
-	}
+	    items: [
+		{
+		    xtype: 'textfield',
+		    fieldLabel: gettext('Name'),
+		    name: 'name',
+		    reference: 'nameField',
+		    allowBlank: true,
+		},
+		{
+		    xtype: 'pveMemoryField',
+		    fieldLabel: gettext('Memory'),
+		    name: 'memory',
+		    reference: 'memoryField',
+		    value: '',
+		    allowBlank: true,
+		},
+		{
+		    xtype: 'proxmoxintegerfield',
+		    fieldLabel: gettext('Cores'),
+		    name: 'cores',
+		    reference: 'coresField',
+		    minValue: 1,
+		    maxValue: 128,
+		    allowBlank: true,
+		},
+		{
+		    xtype: 'proxmoxintegerfield',
+		    fieldLabel: gettext('Sockets'),
+		    name: 'sockets',
+		    reference: 'socketsField',
+		    minValue: 1,
+		    maxValue: 4,
+		    allowBlank: true,
+		    hidden: me.vmtype !== 'qemu',
+		    disabled: me.vmtype !== 'qemu',
+		},
+	    ],
+	});
 
 	let title = gettext('Restore') + ": " + (me.vmtype === 'lxc' ? 'CT' : 'VM');
 	if (me.vmid) {
-- 
2.30.2





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

* [pve-devel] [PATCH manager 2/2] ui: restore: display "Hostname" for container
  2022-04-28  7:04 [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
@ 2022-04-28  7:04 ` Fabian Ebner
  2022-04-28  9:15   ` [pve-devel] applied: " Thomas Lamprecht
  2022-04-28  7:07 ` [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
  2022-04-28  9:15 ` [pve-devel] applied: " Thomas Lamprecht
  2 siblings, 1 reply; 5+ messages in thread
From: Fabian Ebner @ 2022-04-28  7:04 UTC (permalink / raw)
  To: pve-devel

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

diff --git a/www/manager6/window/Restore.js b/www/manager6/window/Restore.js
index 9f52c872..afac38ba 100644
--- a/www/manager6/window/Restore.js
+++ b/www/manager6/window/Restore.js
@@ -304,7 +304,7 @@ Ext.define('PVE.window.Restore', {
 	    items: [
 		{
 		    xtype: 'textfield',
-		    fieldLabel: gettext('Name'),
+		    fieldLabel: me.vmtype === 'lxc' ? gettext('Hostname') : gettext('Name'),
 		    name: 'name',
 		    reference: 'nameField',
 		    allowBlank: true,
-- 
2.30.2





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

* Re: [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset
  2022-04-28  7:04 [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
  2022-04-28  7:04 ` [pve-devel] [PATCH manager 2/2] ui: restore: display "Hostname" for container Fabian Ebner
@ 2022-04-28  7:07 ` Fabian Ebner
  2022-04-28  9:15 ` [pve-devel] applied: " Thomas Lamprecht
  2 siblings, 0 replies; 5+ messages in thread
From: Fabian Ebner @ 2022-04-28  7:07 UTC (permalink / raw)
  To: pve-devel, Thomas Lamprecht

Am 28.04.22 um 09:04 schrieb Fabian Ebner:
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>  www/manager6/window/Restore.js | 86 ++++++++++++++++++----------------
>  1 file changed, 45 insertions(+), 41 deletions(-)
> 

Forgot to mention that this is a small follow-up for the non-disk
patches of the "more flexible restore" series, as briefly discussed with
Thomas off-list.




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

* [pve-devel] applied: [PATCH manager 1/2] ui: restore: group override settings in a fieldset
  2022-04-28  7:04 [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
  2022-04-28  7:04 ` [pve-devel] [PATCH manager 2/2] ui: restore: display "Hostname" for container Fabian Ebner
  2022-04-28  7:07 ` [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
@ 2022-04-28  9:15 ` Thomas Lamprecht
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2022-04-28  9:15 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Ebner

On 28.04.22 09:04, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>  www/manager6/window/Restore.js | 86 ++++++++++++++++++----------------
>  1 file changed, 45 insertions(+), 41 deletions(-)
> 
>

applied, I moved the layout from the "column" one to a hbox with two child panels like
we do in InputPanel, as column is notoriously tricky to get right w.r.t. to using the
full space available, padding and positioning, thanks!




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

* [pve-devel] applied: [PATCH manager 2/2] ui: restore: display "Hostname" for container
  2022-04-28  7:04 ` [pve-devel] [PATCH manager 2/2] ui: restore: display "Hostname" for container Fabian Ebner
@ 2022-04-28  9:15   ` Thomas Lamprecht
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Lamprecht @ 2022-04-28  9:15 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Ebner

On 28.04.22 09:04, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
> ---
>  www/manager6/window/Restore.js | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!




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

end of thread, other threads:[~2022-04-28  9:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-28  7:04 [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
2022-04-28  7:04 ` [pve-devel] [PATCH manager 2/2] ui: restore: display "Hostname" for container Fabian Ebner
2022-04-28  9:15   ` [pve-devel] applied: " Thomas Lamprecht
2022-04-28  7:07 ` [pve-devel] [PATCH manager 1/2] ui: restore: group override settings in a fieldset Fabian Ebner
2022-04-28  9:15 ` [pve-devel] applied: " 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