public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Robert Obkircher <r.obkircher@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [PATCH v1 proxmox-backup 1/2] www: fix incorrect prune count on datastores summary
Date: Wed,  3 Jun 2026 17:22:16 +0200	[thread overview]
Message-ID: <20260603152257.285923-2-r.obkircher@proxmox.com> (raw)
In-Reply-To: <20260603152257.285923-1-r.obkircher@proxmox.com>

The number of prune tasks was always zero because they were summed up
using an incorrect datastore ID. Taking only the part before the first
colon fixes this issue.

This caused some confusion in a forum thread about unexpected disk
usage.

Fixes: https://forum.proxmox.com/threads/183886
Signed-off-by: Robert Obkircher <r.obkircher@proxmox.com>
---
 www/Utils.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/Utils.js b/www/Utils.js
index bf4b025c7..8f382a3b4 100644
--- a/www/Utils.js
+++ b/www/Utils.js
@@ -280,7 +280,10 @@ Ext.define('PBS.Utils', {
         } else if (type === 'garbage_collection') {
             return id;
         } else if (type === 'prune') {
-            return id;
+            res = PBS.Utils.PRUNE_JOB_ID_RE.exec(id);
+            if (res) {
+                result = res[1];
+            }
         }
 
         return result;
@@ -410,6 +413,9 @@ Ext.define('PBS.Utils', {
                 ':',
         );
         me.BACKUP_JOB_ID_RE = new RegExp('^' + PROXMOX_SAFE_ID_REGEX + ':');
+        // Only parse the datastore for now, ignore the optional namespace.
+        // Examples: "datastore1::host/devel", "datastore2:"
+        me.PRUNE_JOB_ID_RE = new RegExp('^' + PROXMOX_SAFE_ID_REGEX + '(?::|$)');
 
         // do whatever you want here
         Proxmox.Utils.override_task_descriptions({
-- 
2.47.3





  reply	other threads:[~2026-06-03 15:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 15:22 [PATCH v1 proxmox-backup 0/2] fix prune and sync count on datastores summary Robert Obkircher
2026-06-03 15:22 ` Robert Obkircher [this message]
2026-06-03 15:22 ` [PATCH v1 proxmox-backup 2/2] www: fix incorrect " Robert Obkircher

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=20260603152257.285923-2-r.obkircher@proxmox.com \
    --to=r.obkircher@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal