From 7ba99fef868f5e378246a01355e1ba5de1d60a02 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Mon, 17 May 2021 09:03:14 +0200 Subject: [PATCH] ui: datastore/Content: fix wrong tooltip for forgetting sometimes it's a group, not a snapshot Signed-off-by: Dominik Csapak --- 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, },