We cannot verify, download, file-browse backups which are currently
in progress.
'Forget' could work but is probably not desirable?
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
iconCls: 'fa fa-refresh',
handler: 'reload',
},
iconCls: 'fa fa-refresh',
handler: 'reload',
},
{
xtype: 'proxmoxButton',
text: gettext('Verify'),
disabled: true,
parentXType: 'pbsDataStoreContent',
{
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',
},
{
handler: 'onVerify',
},
{
text: gettext('Prune'),
disabled: true,
parentXType: 'pbsDataStoreContent',
text: gettext('Prune'),
disabled: true,
parentXType: 'pbsDataStoreContent',
- enableFn: function(record) { return !record.data.leaf; },
+ enableFn: (rec) => !rec.data.leaf,
disabled: true,
parentXType: 'pbsDataStoreContent',
handler: 'onForget',
disabled: true,
parentXType: 'pbsDataStoreContent',
handler: 'onForget',
confirmMsg: function(record) {
confirmMsg: function(record) {
let name = record.data.text;
return Ext.String.format(gettext('Are you sure you want to remove snapshot {0}'), `'${name}'`);
},
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',
{
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",
},
{
xtype: "proxmoxButton",
handler: 'openPxarBrowser',
parentXType: 'pbsDataStoreContent',
enableFn: function(record) {
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'));