ui: datastore: extend action tooltips with IDs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-10-28 18:24:29 +01:00
parent db67e4fe06
commit 40492a562f
1 changed files with 4 additions and 4 deletions

View File

@ -519,25 +519,25 @@ Ext.define('PBS.DataStoreContent', {
items: [ items: [
{ {
handler: 'onVerify', handler: 'onVerify',
tooltip: gettext('Verify'), getTip: (v, m, rec) => Ext.String.format(gettext("Verify '{0}'"), v),
getClass: (v, m, rec) => rec.data.leaf ? 'pmx-hidden' : 'pve-icon-verify-lettering', getClass: (v, m, rec) => rec.data.leaf ? 'pmx-hidden' : 'pve-icon-verify-lettering',
isDisabled: (v, r, c, i, rec) => !!rec.data.leaf, isDisabled: (v, r, c, i, rec) => !!rec.data.leaf,
}, },
{ {
handler: 'onPrune', handler: 'onPrune',
tooltip: gettext('Prune'), getTip: (v, m, rec) => Ext.String.format(gettext("Prune '{0}'"), v),
getClass: (v, m, rec) => rec.parentNode.id ==='root' ? 'fa fa-scissors' : 'pmx-hidden', getClass: (v, m, rec) => rec.parentNode.id ==='root' ? 'fa fa-scissors' : 'pmx-hidden',
isDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root', isDisabled: (v, r, c, i, rec) => rec.parentNode.id !=='root',
}, },
{ {
handler: 'onForget', handler: 'onForget',
tooltip: gettext('Forget Snapshot'), getTip: (v, m, rec) => Ext.String.format(gettext("Permanently forget snapshot '{0}'"), v),
getClass: (v, m, rec) => !rec.data.leaf && rec.parentNode.id !== 'root' ? 'fa critical fa-trash-o' : 'pmx-hidden', getClass: (v, m, rec) => !rec.data.leaf && rec.parentNode.id !== 'root' ? 'fa critical fa-trash-o' : 'pmx-hidden',
isDisabled: (v, r, c, i, rec) => rec.data.leaf || rec.parentNode.id === 'root', isDisabled: (v, r, c, i, rec) => rec.data.leaf || rec.parentNode.id === 'root',
}, },
{ {
handler: 'downloadFile', handler: 'downloadFile',
tooltip: gettext('Download'), getTip: (v, m, rec) => Ext.String.format(gettext("Download '{0}'"), v),
getClass: (v, m, rec) => rec.data.leaf && rec.data.filename ? 'fa fa-download' : 'pmx-hidden', getClass: (v, m, rec) => rec.data.leaf && rec.data.filename ? 'fa fa-download' : 'pmx-hidden',
isDisabled: (v, r, c, i, rec) => !rec.data.leaf || !rec.data.filename || rec.data['crypt-mode'] > 2, isDisabled: (v, r, c, i, rec) => !rec.data.leaf || !rec.data.filename || rec.data['crypt-mode'] > 2,
}, },