From f9b824ac307f8166a5552836b7a0b980c0d2adfb Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 26 May 2021 19:02:58 +0200 Subject: [PATCH] ui: tape overview: include more context in restore tooltips Signed-off-by: Thomas Lamprecht --- www/tape/BackupOverview.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/www/tape/BackupOverview.js b/www/tape/BackupOverview.js index 690836c3..9793887f 100644 --- a/www/tape/BackupOverview.js +++ b/www/tape/BackupOverview.js @@ -58,10 +58,11 @@ Ext.define('PBS.TapeManagement.BackupOverview', { if (data[pool][media_set] === undefined) { data[pool][media_set] = entry; data[pool][media_set].text = media_set; - data[pool][media_set].restore =true; + data[pool][media_set].restore = true; data[pool][media_set].tapes = 1; data[pool][media_set]['seq-nr'] = undefined; data[pool][media_set].is_media_set = true; + data[pool][media_set].typeText = 'media-set'; } else { data[pool][media_set].tapes++; } @@ -161,6 +162,7 @@ Ext.define('PBS.TapeManagement.BackupOverview', { text: store, 'media-set-uuid': entry['media-set-uuid'], iconCls: 'fa fa-database', + typeText: 'datastore', restore: true, 'media-set': media_set, prefilter: { @@ -196,6 +198,7 @@ Ext.define('PBS.TapeManagement.BackupOverview', { }, 'media-set': media_set, iconCls: `fa ${iconCls}`, + typeText: `group`, children: [], }); } @@ -283,10 +286,17 @@ Ext.define('PBS.TapeManagement.BackupOverview', { { header: gettext('Restore'), xtype: 'actioncolumn', + dataIndex: 'text', items: [ { handler: 'restoreBackups', - tooltip: gettext('Restore'), + getTip: (v, m, rec) => { + let typeText = rec.get('typeText'); + if (typeText) { + v = `${typeText} '${v}'`; + } + return Ext.String.format(gettext("Open restore wizard for {0}"), v); + }, getClass: (v, m, rec) => rec.data.restore ? 'fa fa-fw fa-undo' : 'pmx-hidden', isDisabled: (v, r, c, i, rec) => !rec.data.restore, },