From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 6DAA31FF13B for ; Wed, 03 Jun 2026 14:05:04 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5C9E19CBC; Wed, 3 Jun 2026 14:05:03 +0200 (CEST) Message-ID: <71bf2ca3-31a6-4696-a5ff-a750ba0f677c@proxmox.com> Date: Wed, 3 Jun 2026 14:04:29 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH proxmox-backup 3/6] www: access active operation fields by name instead of index To: Robert Obkircher , pbs-devel@lists.proxmox.com References: <20260602130001.217482-1-r.obkircher@proxmox.com> <20260602130001.217482-9-r.obkircher@proxmox.com> Content-Language: en-US, de-DE From: Christian Ebner In-Reply-To: <20260602130001.217482-9-r.obkircher@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1780488233094 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.069 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: 2WXGITT7PYDOYS6N4MYYJZSLLTSJZJXS X-Message-ID-Hash: 2WXGITT7PYDOYS6N4MYYJZSLLTSJZJXS X-MailFrom: c.ebner@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: On 6/2/26 3:01 PM, Robert Obkircher wrote: > Avoid relying on (presumably sorted) field order so new fields could > be added to the API response in the future. > > Signed-off-by: Robert Obkircher > --- > www/datastore/OptionView.js | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/www/datastore/OptionView.js b/www/datastore/OptionView.js > index 42a6104dc..64e47aa57 100644 > --- a/www/datastore/OptionView.js > +++ b/www/datastore/OptionView.js > @@ -122,8 +122,13 @@ Ext.define('PBS.Datastore.Options', { > > view.mon(me.activeOperationsRstore, 'load', (store, data, success) => { > let activeTasks = me.getView().maintenanceActiveTasks; > - activeTasks.read = data?.[0]?.data.value ?? 0; > - activeTasks.write = data?.[1]?.data.value ?? 0; > + if (success) { > + activeTasks.read = store.getById('read')?.data.value ?? 0; > + activeTasks.write = store.getById('write')?.data.value ?? 0; > + } else { > + activeTasks.read = 0; > + activeTasks.write = 0; > + } > }); > }, > This introduces formatting issues as reported by `proxmox-biome check www`.