ui: tape overview: include more context in restore tooltips

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-05-26 19:02:58 +02:00
parent 9a535ec77b
commit f9b824ac30

View File

@ -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,
},