From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id D62021FF141 for ; Tue, 02 Jun 2026 15:01:36 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E04A113CFD; Tue, 2 Jun 2026 15:01:35 +0200 (CEST) From: Robert Obkircher To: pbs-devel@lists.proxmox.com Subject: [PATCH proxmox-backup 6/6] fix #5797: www: display new GarbageCollection maintenance mode Date: Tue, 2 Jun 2026 14:59:02 +0200 Message-ID: <20260602130001.217482-12-r.obkircher@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260602130001.217482-1-r.obkircher@proxmox.com> References: <20260602130001.217482-1-r.obkircher@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1780405218284 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.052 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 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 Message-ID-Hash: HSBLGMPMZIK3NKPQIXJUD6UXSMWJKTIF X-Message-ID-Hash: HSBLGMPMZIK3NKPQIXJUD6UXSMWJKTIF X-MailFrom: r.obkircher@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Display the new mode and make it selectable. Subtract non-expanding writes from the number of conflicts, since they are allowed in this mode. Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=5797 Signed-off-by: Robert Obkircher --- www/Utils.js | 4 ++++ www/datastore/OptionView.js | 3 +++ www/window/MaintenanceOptions.js | 1 + 3 files changed, 8 insertions(+) diff --git a/www/Utils.js b/www/Utils.js index bf4b025c7..fa49fcbf8 100644 --- a/www/Utils.js +++ b/www/Utils.js @@ -824,6 +824,7 @@ Ext.define('PBS.Utils', { if (activeTasks !== undefined) { const conflictingTasks = activeTasks.write + + (type === 'garbage-collection' ? -activeTasks.writeNonExpanding : 0) + (type === 'offline' || type === 'unmount' ? activeTasks.read : 0); if (conflictingTasks > 0) { @@ -846,6 +847,9 @@ Ext.define('PBS.Utils', { case 'read-only': modeText = gettext('Read-only'); break; + case 'garbage-collection': + modeText = gettext('Garbage Collection'); + break; case 'offline': modeText = gettext('Offline'); break; diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js index 64e47aa57..683770738 100644 --- a/www/datastore/OptionView.js +++ b/www/datastore/OptionView.js @@ -93,6 +93,7 @@ Ext.define('PBS.Datastore.Options', { me.maintenanceActiveTasks = { read: 0, write: 0, + writeNonExpanding: 0, }; me.datastore = encodeURIComponent(me.datastore); me.url = `/api2/json/config/datastore/${me.datastore}`; @@ -125,9 +126,11 @@ Ext.define('PBS.Datastore.Options', { if (success) { activeTasks.read = store.getById('read')?.data.value ?? 0; activeTasks.write = store.getById('write')?.data.value ?? 0; + activeTasks.writeNonExpanding = store.getById('writeNonExpanding')?.data.value ?? 0; } else { activeTasks.read = 0; activeTasks.write = 0; + activeTasks.writeNonExpanding = 0; } }); }, diff --git a/www/window/MaintenanceOptions.js b/www/window/MaintenanceOptions.js index 9a735e5e8..9228f4ee9 100644 --- a/www/window/MaintenanceOptions.js +++ b/www/window/MaintenanceOptions.js @@ -5,6 +5,7 @@ Ext.define('PBS.form.maintenanceType', { comboItems: [ ['__default__', gettext('None')], ['read-only', gettext('Read only')], + ['garbage-collection', gettext('Garbage Collection')], ['offline', gettext('Offline')], ], }); -- 2.47.3