[pve-devel] [PATCH manager 2/2] ui: use pveDescriptionFieldContainer for the advanced backup options

Dominik Csapak d.csapak at proxmox.com
Mon Apr 22 09:43:06 CEST 2024


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 at 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





More information about the pve-devel mailing list