public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v2 2/2] ui: use pveTwoColumnContainer for the advanced backup options
Date: Mon, 22 Apr 2024 10:16:46 +0200	[thread overview]
Message-ID: <20240422081646.838784-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20240422081646.838784-1-d.csapak@proxmox.com>

where we generally want to show a field on the left, but a description
on the right.

merges the column1/2/B into just items.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
changes from v1:
* adapt to changes in 1/2

better viewed with -w, since most of the patch is just adding a level of
indent

 www/manager6/panel/BackupAdvancedOptions.js | 133 ++++++++++----------
 1 file changed, 67 insertions(+), 66 deletions(-)

diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js
index 0ea585a8..38db0168 100644
--- a/www/manager6/panel/BackupAdvancedOptions.js
+++ b/www/manager6/panel/BackupAdvancedOptions.js
@@ -66,46 +66,67 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 	}
     },
 
-    column1: [
+    items: [
 	{
-	    xtype: 'pveBandwidthField',
-	    name: 'bwlimit',
-	    fieldLabel: gettext('Bandwidth Limit'),
-	    emptyText: Ext.String.format(gettext('Fallback (default {0})'), 0),
-	    backendUnit: 'KiB',
-	    allowZero: true,
-	    emptyValue: '',
-	    autoEl: {
-		tag: 'div',
-		'data-qtip': Ext.String.format(gettext('Use {0} for unlimited'), 0),
+	    xtype: 'pveTwoColumnContainer',
+	    startWidget: {
+		xtype: 'pveBandwidthField',
+		name: 'bwlimit',
+		fieldLabel: gettext('Bandwidth Limit'),
+		emptyText: Ext.String.format(gettext('Fallback (default {0})'), 0),
+		backendUnit: 'KiB',
+		allowZero: true,
+		emptyValue: '',
+		autoEl: {
+		    tag: 'div',
+		    'data-qtip': Ext.String.format(gettext('Use {0} for unlimited'), 0),
+		},
+	    },
+	    endWidget: {
+		xtype: 'displayfield',
+		value: gettext('Limit I/O bandwidth.'),
 	    },
 	},
 	{
-	    xtype: 'proxmoxintegerfield',
-	    name: 'zstd',
-	    reference: 'zstdThreadCount',
-	    fieldLabel: Ext.String.format(gettext('{0} Threads'), 'Zstd'),
-	    fieldStyle: 'text-align: right',
-	    emptyText: Ext.String.format(gettext('Fallback (default {0})'), 1),
-	    minValue: 0,
-	    cbind: {
-		deleteEmpty: '{!isCreate}',
+	    xtype: 'pveTwoColumnContainer',
+	    startWidget: {
+		xtype: 'proxmoxintegerfield',
+		name: 'zstd',
+		reference: 'zstdThreadCount',
+		fieldLabel: Ext.String.format(gettext('{0} Threads'), 'Zstd'),
+		fieldStyle: 'text-align: right',
+		emptyText: Ext.String.format(gettext('Fallback (default {0})'), 1),
+		minValue: 0,
+		cbind: {
+		    deleteEmpty: '{!isCreate}',
+		},
+		autoEl: {
+		    tag: 'div',
+		    'data-qtip': gettext('With 0, half of the available cores are used'),
+		},
 	    },
-	    autoEl: {
-		tag: 'div',
-		'data-qtip': gettext('With 0, half of the available cores are used'),
+	    endWidget: {
+		xtype: 'displayfield',
+		value: gettext('Threads used for zstd compression (non-PBS).'),
 	    },
 	},
 	{
-	    xtype: 'proxmoxintegerfield',
-	    name: 'max-workers',
-	    minValue: 1,
-	    maxValue: 256,
-	    fieldLabel: gettext('IO-Workers'),
-	    fieldStyle: 'text-align: right',
-	    emptyText: Ext.String.format(gettext('Fallback (default {0})'), 16),
-	    cbind: {
-		deleteEmpty: '{!isCreate}',
+	    xtype: 'pveTwoColumnContainer',
+	    startWidget: {
+		xtype: 'proxmoxintegerfield',
+		name: 'max-workers',
+		minValue: 1,
+		maxValue: 256,
+		fieldLabel: gettext('IO-Workers'),
+		fieldStyle: 'text-align: right',
+		emptyText: Ext.String.format(gettext('Fallback (default {0})'), 16),
+		cbind: {
+		    deleteEmpty: '{!isCreate}',
+		},
+	    },
+	    endWidget: {
+		xtype: 'displayfield',
+		value: gettext('I/O workers in the QEMU process (VMs only).'),
 	    },
 	},
 	{
@@ -123,42 +144,22 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 	    },
 	},
 	{
-	    xtype: 'proxmoxcheckbox',
-	    fieldLabel: gettext('Repeat missed'),
-	    name: 'repeat-missed',
-	    uncheckedValue: 0,
-	    defaultValue: 0,
-	    cbind: {
-		deleteDefaultValue: '{!isCreate}',
+	    xtype: 'pveTwoColumnContainer',
+	    startWidget: {
+		xtype: 'proxmoxcheckbox',
+		fieldLabel: gettext('Repeat missed'),
+		name: 'repeat-missed',
+		uncheckedValue: 0,
+		defaultValue: 0,
+		cbind: {
+		    deleteDefaultValue: '{!isCreate}',
+		},
 	    },
+	    endWidget:{
+		xtype: 'displayfield',
+		value: gettext("Run jobs as soon as possible if they couldn't start on schedule, for example, due to the node being offline."),
+	    }
 	},
-    ],
-
-    column2: [
-	{
-	    xtype: 'displayfield',
-	    value: gettext('Limit I/O bandwidth.'),
-	},
-	{
-	    xtype: 'displayfield',
-	    value: gettext('Threads used for zstd compression (non-PBS).'),
-	},
-	{
-	    xtype: 'displayfield',
-	    value: gettext('I/O workers in the QEMU process (VMs only).'),
-	},
-	{
-	    xtype: 'displayfield',
-	    value: 'TODO',
-	    hidden: true, // see definition of pbs-entries-max field
-	},
-	{
-	    xtype: 'displayfield',
-	    value: gettext("Run jobs as soon as possible if they couldn't start on schedule, for example, due to the node being offline."),
-	},
-    ],
-
-    columnB: [
 	{
 	    xtype: 'component',
 	    padding: '5 1',
-- 
2.39.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2024-04-22  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-22  8:16 [pve-devel] [PATCH manager v2 1/2] ui: form: add TwoColumnContainer Dominik Csapak
2024-04-22  8:16 ` Dominik Csapak [this message]
2024-04-22  8:22   ` [pve-devel] [PATCH manager v2 2/2] ui: use pveTwoColumnContainer for the advanced backup options Fiona Ebner
2024-04-22  8:28     ` Fiona Ebner
2024-04-22  9:30 ` [pve-devel] applied: [PATCH manager v2 1/2] ui: form: add TwoColumnContainer Thomas Lamprecht

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=20240422081646.838784-2-d.csapak@proxmox.com \
    --to=d.csapak@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 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