public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content
@ 2026-05-07  8:57 Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 1/6] ui: datastore: update code formatting with biome Erik Fastermann
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Erik Fastermann @ 2026-05-07  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: Erik Fastermann

Enable search by the comment field in the datastore content.

Also includes multiple small bug fixes:

- Display items again when searching by a non existing value and
   clearing the search bar.
- Correctly disable the remove box and tooltip for namespaces.
- Correctly disable the browse box and tooltip for the root namespace. 

Erik Fastermann (6):
  ui: datastore: update code formatting with biome
  fix #6691: allow search by comment in datastore content
  ui: datastore: case-insensitive search on all content fields
  ui: datastore: disable remove action for namespaces
  ui: datastore: disable browse action for root ns
  ui: datastore: fix content search empty tree

 www/datastore/Content.js | 44 +++++++++++++++++++++++++---------------
 1 file changed, 28 insertions(+), 16 deletions(-)

-- 
2.47.3




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH proxmox-backup v3 1/6] ui: datastore: update code formatting with biome
  2026-05-07  8:57 [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content Erik Fastermann
@ 2026-05-07  8:57 ` Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 2/6] fix #6691: allow search by comment in datastore content Erik Fastermann
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Erik Fastermann @ 2026-05-07  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: Erik Fastermann

Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---

 changes since v2:
 * reorder as the first patch

 www/datastore/Content.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 1ec07505d..8bf2356d4 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -1150,14 +1150,18 @@ Ext.define('PBS.DataStoreContent', {
                         return Ext.String.format(gettext("Move namespace '{0}'"), v);
                     },
                     getClass: (v, m, { data }) => {
-                        if (data.ty === 'group') { return 'fa fa-arrows'; }
+                        if (data.ty === 'group') {
+                            return 'fa fa-arrows';
+                        }
                         if (data.ty === 'ns' && !data.isRootNS && data.ns === undefined) {
                             return 'fa fa-arrows';
                         }
                         return 'pmx-hidden';
                     },
                     isActionDisabled: (v, r, c, i, { data }) => {
-                        if (data.ty === 'group') { return false; }
+                        if (data.ty === 'group') {
+                            return false;
+                        }
                         if (data.ty === 'ns' && !data.isRootNS && data.ns === undefined) {
                             return false;
                         }
-- 
2.47.3




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH proxmox-backup v3 2/6] fix #6691: allow search by comment in datastore content
  2026-05-07  8:57 [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 1/6] ui: datastore: update code formatting with biome Erik Fastermann
@ 2026-05-07  8:57 ` Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 3/6] ui: datastore: case-insensitive search on all content fields Erik Fastermann
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Erik Fastermann @ 2026-05-07  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: Erik Fastermann

Using case-insensitive matching.

Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---

 changes since v2:
 * split out search by comment as separate commit,
   detached from case insensitive search on all fields

 www/datastore/Content.js | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 8bf2356d4..e7240832a 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -941,6 +941,13 @@ Ext.define('PBS.DataStoreContent', {
                 return true;
             }
 
+            if (
+                item.data.comment &&
+                item.data.comment.toLowerCase().includes(value.toLowerCase())
+            ) {
+                return true;
+            }
+
             return false;
         },
 
@@ -1490,7 +1497,7 @@ Ext.define('PBS.DataStoreContent', {
         {
             xtype: 'textfield',
             reference: 'searchbox',
-            emptyText: gettext('group, date or owner'),
+            emptyText: gettext('group, date, owner or comment'),
             triggers: {
                 clear: {
                     cls: 'pmx-clear-trigger',
-- 
2.47.3




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH proxmox-backup v3 3/6] ui: datastore: case-insensitive search on all content fields
  2026-05-07  8:57 [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 1/6] ui: datastore: update code formatting with biome Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 2/6] fix #6691: allow search by comment in datastore content Erik Fastermann
@ 2026-05-07  8:57 ` Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 4/6] ui: datastore: disable remove action for namespaces Erik Fastermann
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Erik Fastermann @ 2026-05-07  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: Erik Fastermann

Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---

 changes since v2:
 * split out case insensitive search on all fields
   as a separate commit, detached from searching by comment

 www/datastore/Content.js | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index e7240832a..42a48a742 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -933,22 +933,13 @@ Ext.define('PBS.DataStoreContent', {
         },
 
         filter: function (item, value) {
-            if (item.data.text.indexOf(value) !== -1) {
-                return true;
-            }
-
-            if (item.data.owner && item.data.owner.indexOf(value) !== -1) {
-                return true;
-            }
+            const needle = value.toLowerCase();
 
-            if (
-                item.data.comment &&
-                item.data.comment.toLowerCase().includes(value.toLowerCase())
-            ) {
-                return true;
-            }
-
-            return false;
+            return (
+                item.data.text.toLowerCase().includes(needle) ||
+                (item.data.owner && item.data.owner.toLowerCase().includes(needle)) ||
+                (item.data.comment && item.data.comment.toLowerCase().includes(needle))
+            );
         },
 
         search: function (tf, value) {
-- 
2.47.3




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH proxmox-backup v3 4/6] ui: datastore: disable remove action for namespaces
  2026-05-07  8:57 [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content Erik Fastermann
                   ` (2 preceding siblings ...)
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 3/6] ui: datastore: case-insensitive search on all content fields Erik Fastermann
@ 2026-05-07  8:57 ` Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 5/6] ui: datastore: disable browse action for root ns Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 6/6] ui: datastore: fix content search empty tree Erik Fastermann
  5 siblings, 0 replies; 7+ messages in thread
From: Erik Fastermann @ 2026-05-07  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: Erik Fastermann

Since the namespace entry does not show a remove button,
also disable the action itself and hide the tooltip.

Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---

 changes since v2:
 * explain the why in the commit message

 www/datastore/Content.js | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 42a48a742..659f5c2eb 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -1212,7 +1212,13 @@ Ext.define('PBS.DataStoreContent', {
                         data.ty === 'dir'
                             ? 'fa critical fa-trash-o'
                             : 'pmx-hidden',
-                    isActionDisabled: (v, r, c, i, { data }) => false,
+                    isActionDisabled: (v, r, c, i, { data }) => {
+                        const enabled =
+                            (data.ty === 'ns' && !data.isRootNS && data.ns === undefined) ||
+                            data.ty === 'group' ||
+                            data.ty === 'dir';
+                        return !enabled;
+                    },
                 },
                 {
                     handler: 'downloadFile',
-- 
2.47.3




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH proxmox-backup v3 5/6] ui: datastore: disable browse action for root ns
  2026-05-07  8:57 [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content Erik Fastermann
                   ` (3 preceding siblings ...)
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 4/6] ui: datastore: disable remove action for namespaces Erik Fastermann
@ 2026-05-07  8:57 ` Erik Fastermann
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 6/6] ui: datastore: fix content search empty tree Erik Fastermann
  5 siblings, 0 replies; 7+ messages in thread
From: Erik Fastermann @ 2026-05-07  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: Erik Fastermann

Since the root namespace does not show a browse button,
also disable the action itself and hide the tooltip.

Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---

 changes since v2:
 * explain the why in the commit message

 www/datastore/Content.js | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 659f5c2eb..3d55b454c 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -1242,13 +1242,14 @@ Ext.define('PBS.DataStoreContent', {
                         }
                         return 'pmx-hidden';
                     },
-                    isActionDisabled: (v, r, c, i, { data }) =>
-                        !(
+                    isActionDisabled: (v, r, c, i, { data }) => {
+                        const enableFile =
                             data.ty === 'file' &&
                             (data.filename.endsWith('.pxar.didx') ||
                                 data.filename.endsWith('.mpxar.didx')) &&
-                            data['crypt-mode'] < 3
-                        ) && data.ty !== 'ns',
+                            data['crypt-mode'] < 3;
+                        return !enableFile && (data.ty !== 'ns' || data.root);
+                    },
                 },
             ],
         },
-- 
2.47.3




^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH proxmox-backup v3 6/6] ui: datastore: fix content search empty tree
  2026-05-07  8:57 [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content Erik Fastermann
                   ` (4 preceding siblings ...)
  2026-05-07  8:57 ` [PATCH proxmox-backup v3 5/6] ui: datastore: disable browse action for root ns Erik Fastermann
@ 2026-05-07  8:57 ` Erik Fastermann
  5 siblings, 0 replies; 7+ messages in thread
From: Erik Fastermann @ 2026-05-07  8:57 UTC (permalink / raw)
  To: pbs-devel; +Cc: Erik Fastermann

Display items again when searching by a non existing value and
clearing the search bar.

Co-authored-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Erik Fastermann <e.fastermann@proxmox.com>
---

 changes since v2:
 * improved the fix to more accurately address the underlying problem

 www/datastore/Content.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 3d55b454c..bd989e660 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -950,6 +950,9 @@ Ext.define('PBS.DataStoreContent', {
                 store.clearFilter();
                 // only collapse the children below our toplevel namespace "root"
                 store.getRoot().lastChild.collapseChildren(true);
+                // expand just the namespace "root", otherwise the navigation breaks,
+                // as the children are not accessible anymore
+                store.getRoot().lastChild.expand();
                 tf.triggers.clear.setVisible(false);
                 return;
             }
-- 
2.47.3




^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-05-07  8:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07  8:57 [PATCH proxmox-backup v3 0/6] fix #6691: allow search by comment in datastore content Erik Fastermann
2026-05-07  8:57 ` [PATCH proxmox-backup v3 1/6] ui: datastore: update code formatting with biome Erik Fastermann
2026-05-07  8:57 ` [PATCH proxmox-backup v3 2/6] fix #6691: allow search by comment in datastore content Erik Fastermann
2026-05-07  8:57 ` [PATCH proxmox-backup v3 3/6] ui: datastore: case-insensitive search on all content fields Erik Fastermann
2026-05-07  8:57 ` [PATCH proxmox-backup v3 4/6] ui: datastore: disable remove action for namespaces Erik Fastermann
2026-05-07  8:57 ` [PATCH proxmox-backup v3 5/6] ui: datastore: disable browse action for root ns Erik Fastermann
2026-05-07  8:57 ` [PATCH proxmox-backup v3 6/6] ui: datastore: fix content search empty tree Erik Fastermann

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