iconCls: 'fa fa-refresh',
handler: 'reload',
},
+ '-',
{
xtype: 'proxmoxButton',
text: gettext('Verify'),
disabled: true,
parentXType: 'pbsDataStoreContent',
- enableFn: function(record) { return !!record.data; },
+ enableFn: (rec) => !!rec.data && rec.data.size !== null,
handler: 'onVerify',
},
{
text: gettext('Prune'),
disabled: true,
parentXType: 'pbsDataStoreContent',
- enableFn: function(record) { return !record.data.leaf; },
+ enableFn: (rec) => !rec.data.leaf,
handler: 'onPrune',
},
{
disabled: true,
parentXType: 'pbsDataStoreContent',
handler: 'onForget',
+ dangerous: true,
confirmMsg: function(record) {
- console.log(record);
+ //console.log(record);
let name = record.data.text;
return Ext.String.format(gettext('Are you sure you want to remove snapshot {0}'), `'${name}'`);
},
- enableFn: function(record) {
- return !!record.data.leaf;
- },
+ enableFn: (rec) => !!rec.data.leaf && rec.data.size !== null,
},
+ '-',
{
xtype: 'proxmoxButton',
text: gettext('Download Files'),
disabled: true,
parentXType: 'pbsDataStoreContent',
handler: 'openBackupFileDownloader',
- enableFn: function(record) {
- return !!record.data.leaf;
- },
+ enableFn: (rec) => !!rec.data.leaf && rec.data.size !== null,
},
{
xtype: "proxmoxButton",
handler: 'openPxarBrowser',
parentXType: 'pbsDataStoreContent',
enableFn: function(record) {
- return !!record.data.leaf && record.data.files.some(el => el.filename.endsWith('pxar.didx'));
+ return !!record.data.leaf && record.size !== null && record.data.files.some(el => el.filename.endsWith('pxar.didx'));
},
}
],