From: Nicolas Frey <n.frey@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup 4/4] ui: verify: fetch default {read, verify} thread values from tuning options
Date: Fri, 21 Nov 2025 13:32:09 +0100 [thread overview]
Message-ID: <20251121123209.198368-6-n.frey@proxmox.com> (raw)
In-Reply-To: <20251121123209.198368-1-n.frey@proxmox.com>
making sure that the now default (e.g. emptyText) value matches the
one found at the datastore-tuning level, we fetch the tuning data
and bind it to the respective `emptyText` properties.
Signed-off-by: Nicolas Frey <n.frey@proxmox.com>
---
www/window/VerifyAll.js | 38 +++++++++++++++++++++++++++++++++++--
www/window/VerifyJobEdit.js | 37 ++++++++++++++++++++++++++++++++++++
2 files changed, 73 insertions(+), 2 deletions(-)
diff --git a/www/window/VerifyAll.js b/www/window/VerifyAll.js
index 4239c215..e1670f10 100644
--- a/www/window/VerifyAll.js
+++ b/www/window/VerifyAll.js
@@ -11,6 +11,36 @@ Ext.define('PBS.window.VerifyAll', {
url: `/admin/datastore/{datastore}/verify`,
},
+ viewModel: {
+ data: {
+ defaultReadThreads: null,
+ defaultVerifyThreads: null,
+ },
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.callParent();
+
+ if (me.datastore === undefined) {
+ return;
+ }
+
+ Proxmox.Utils.API2Request({
+ url: `/api2/extjs/config/datastore/${encodeURIComponent(me.datastore)}`,
+ method: 'GET',
+ success: ({ result }) => {
+ let raw = result?.data?.tuning || {};
+ let tuning = PBS.Utils.parsePropertyString(raw);
+
+ me.getViewModel().set({
+ defaultReadThreads: tuning['verify-job-read-threads'] ?? 1,
+ defaultVerifyThreads: tuning['verify-job-verify-threads'] ?? 4,
+ });
+ },
+ });
+ },
+
submitText: gettext('Verify'),
isCreate: true,
showTaskViewer: true,
@@ -84,7 +114,9 @@ Ext.define('PBS.window.VerifyAll', {
xtype: 'proxmoxintegerfield',
name: 'read-threads',
fieldLabel: gettext('# of Read Threads'),
- emptyText: '1',
+ bind: {
+ emptyText: '{defaultReadThreads}',
+ },
skipEmptyText: true,
minValue: 1,
maxValue: 32,
@@ -93,7 +125,9 @@ Ext.define('PBS.window.VerifyAll', {
xtype: 'proxmoxintegerfield',
name: 'verify-threads',
fieldLabel: gettext('# of Verify Threads'),
- emptyText: '4',
+ bind: {
+ emptyText: '{defaultVerifyThreads}',
+ },
skipEmptyText: true,
minValue: 1,
maxValue: 32,
diff --git a/www/window/VerifyJobEdit.js b/www/window/VerifyJobEdit.js
index 5650ed5c..8edc0865 100644
--- a/www/window/VerifyJobEdit.js
+++ b/www/window/VerifyJobEdit.js
@@ -32,8 +32,38 @@ Ext.define('PBS.window.VerifyJobEdit', {
viewModel: {
data: {
ignoreVerified: true,
+ defaultReadThreads: null,
+ defaultVerifyThreads: null,
},
},
+
+ loadThreadDefaults: function (datastore) {
+ Proxmox.Utils.API2Request({
+ url: `/api2/extjs/config/datastore/${encodeURIComponent(datastore)}`,
+ method: 'GET',
+ success: ({ result }) => {
+ let raw = result?.data?.tuning || {};
+ let tuning = PBS.Utils.parsePropertyString(raw);
+
+ this.getViewModel().set({
+ defaultReadThreads: tuning['verify-job-read-threads'] ?? 1,
+ defaultVerifyThreads: tuning['verify-job-verify-threads'] ?? 4,
+ });
+ },
+ });
+ },
+
+ initComponent: function () {
+ let me = this;
+ me.callParent();
+
+ if (me.datastore === undefined) {
+ return;
+ }
+
+ me.loadThreadDefaults(me.datastore);
+ },
+
controller: {
xclass: 'Ext.app.ViewController',
control: {
@@ -46,6 +76,7 @@ Ext.define('PBS.window.VerifyJobEdit', {
let view = this.getView();
let nsSelector = view.down('pbsNamespaceSelector');
nsSelector.setDatastore(value);
+ view.loadThreadDefaults(value)
},
},
@@ -164,6 +195,9 @@ Ext.define('PBS.window.VerifyJobEdit', {
cbind: {
deleteEmpty: '{!isCreate}',
},
+ bind: {
+ emptyText: '{defaultReadThreads}',
+ },
},
{
xtype: 'proxmoxintegerfield',
@@ -175,6 +209,9 @@ Ext.define('PBS.window.VerifyJobEdit', {
cbind: {
deleteEmpty: '{!isCreate}',
},
+ bind: {
+ emptyText: '{defaultVerifyThreads}',
+ },
},
],
advancedColumn2: [
--
2.47.3
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-11-21 12:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-21 12:32 [pbs-devel] [RFC/PATCH proxmox{, -backup} 0/5] tuning: verify: add verify job thread options Nicolas Frey
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox 1/1] pbs-api-types: add verify-job-{read, verify}-threads to tuning options Nicolas Frey
2025-11-21 14:15 ` Christian Ebner
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox-backup 1/4] datastore: add new thread settings " Nicolas Frey
2025-11-21 14:15 ` Christian Ebner
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox-backup 2/4] verify: use tuning options' thread settings for {verify, read}-threads Nicolas Frey
2025-11-21 12:32 ` [pbs-devel] [PATCH proxmox-backup 3/4] ui: tuning: make verify-job-{read, verify}-threads configurable Nicolas Frey
2025-11-21 12:32 ` Nicolas Frey [this message]
2025-11-21 14:15 ` [pbs-devel] [RFC/PATCH proxmox{, -backup} 0/5] tuning: verify: add verify job thread options Christian Ebner
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=20251121123209.198368-6-n.frey@proxmox.com \
--to=n.frey@proxmox.com \
--cc=pbs-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