[pbs-devel] [PATCH proxmox-backup 1/2] ui: datastore/Content: fix wrong tooltip for forgetting

Dominik Csapak d.csapak at proxmox.com
Mon May 17 09:03:14 CEST 2021


sometimes it's a group, not a snapshot

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/datastore/Content.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/www/datastore/Content.js b/www/datastore/Content.js
index 67ebbdac..ca90f82a 100644
--- a/www/datastore/Content.js
+++ b/www/datastore/Content.js
@@ -632,7 +632,9 @@ Ext.define('PBS.DataStoreContent', {
 		},
 		{
 		    handler: 'onForget',
-		    getTip: (v, m, rec) => Ext.String.format(gettext("Permanently forget snapshot '{0}'"), v),
+		    getTip: (v, m, rec) => rec.parentNode.id !=='root'
+			? Ext.String.format(gettext("Permanently forget snapshot '{0}'"), v)
+			: Ext.String.format(gettext("Permanently forget group '{0}'"), v),
 		    getClass: (v, m, rec) => !rec.data.leaf ? 'fa critical fa-trash-o' : 'pmx-hidden',
 		    isDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
 		},
-- 
2.20.1






More information about the pbs-devel mailing list