From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 45C591FF56B
	for <inbox@lore.proxmox.com>; Mon, 22 Apr 2024 09:43:07 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id 6E033947B;
	Mon, 22 Apr 2024 09:43:09 +0200 (CEST)
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Date: Mon, 22 Apr 2024 09:43:06 +0200
Message-Id: <20240422074306.595774-2-d.csapak@proxmox.com>
X-Mailer: git-send-email 2.39.2
In-Reply-To: <20240422074306.595774-1-d.csapak@proxmox.com>
References: <20240422074306.595774-1-d.csapak@proxmox.com>
MIME-Version: 1.0
X-SPAM-LEVEL: Spam detection results:  0
 AWL -1.286 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DMARC_MISSING             0.1 Missing DMARC policy
 ENA_SUBJ_ODD_CASE         2.6 Subject has odd case
 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment
 SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
 SPF_PASS               -0.001 SPF: sender matches SPF record
Subject: [pve-devel] [PATCH manager 2/2] ui: use
 pveDescriptionFieldContainer for the advanced backup options
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
List-Post: <mailto:pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.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>
---
 www/manager6/panel/BackupAdvancedOptions.js | 45 ++++++---------------
 1 file changed, 13 insertions(+), 32 deletions(-)

diff --git a/www/manager6/panel/BackupAdvancedOptions.js b/www/manager6/panel/BackupAdvancedOptions.js
index 0ea585a8..59c785d2 100644
--- a/www/manager6/panel/BackupAdvancedOptions.js
+++ b/www/manager6/panel/BackupAdvancedOptions.js
@@ -66,9 +66,11 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 	}
     },
 
-    column1: [
+    items: [
 	{
-	    xtype: 'pveBandwidthField',
+	    xtype: 'pveDescriptionFieldContainer',
+	    description: gettext('Limit I/O bandwidth.'),
+	    fieldType: 'pveBandwidthField',
 	    name: 'bwlimit',
 	    fieldLabel: gettext('Bandwidth Limit'),
 	    emptyText: Ext.String.format(gettext('Fallback (default {0})'), 0),
@@ -81,7 +83,9 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 	    },
 	},
 	{
-	    xtype: 'proxmoxintegerfield',
+	    xtype: 'pveDescriptionFieldContainer',
+	    fieldType: 'proxmoxintegerfield',
+	    description: gettext('Threads used for zstd compression (non-PBS).'),
 	    name: 'zstd',
 	    reference: 'zstdThreadCount',
 	    fieldLabel: Ext.String.format(gettext('{0} Threads'), 'Zstd'),
@@ -97,7 +101,9 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 	    },
 	},
 	{
-	    xtype: 'proxmoxintegerfield',
+	    xtype: 'pveDescriptionFieldContainer',
+	    fieldType: 'proxmoxintegerfield',
+	    description: gettext('I/O workers in the QEMU process (VMs only).'),
 	    name: 'max-workers',
 	    minValue: 1,
 	    maxValue: 256,
@@ -123,7 +129,9 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 	    },
 	},
 	{
-	    xtype: 'proxmoxcheckbox',
+	    xtype: 'pveDescriptionFieldContainer',
+	    fieldType: 'proxmoxcheckbox',
+	    description: gettext("Run jobs as soon as possible if they couldn't start on schedule, for example, due to the node being offline."),
 	    fieldLabel: gettext('Repeat missed'),
 	    name: 'repeat-missed',
 	    uncheckedValue: 0,
@@ -132,33 +140,6 @@ Ext.define('PVE.panel.BackupAdvancedOptions', {
 		deleteDefaultValue: '{!isCreate}',
 	    },
 	},
-    ],
-
-    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