{
name: 'backup-time',
type: 'date',
- dateFormat: 'timestamp'
+ dateFormat: 'timestamp',
},
'files',
'owner',
'verification',
- { name: 'size', type: 'int', allowNull: true, },
+ { name: 'size', type: 'int', allowNull: true },
{
name: 'crypt-mode',
type: 'boolean',
calculate: function(data) {
- let encrypted = 0;
let crypt = {
none: 0,
mixed: 0,
encrypt: 0,
count: 0,
};
- let signed = 0;
data.files.forEach(file => {
if (file.filename === 'index.json.blob') return; // is never encrypted
let mode = PBS.Utils.cryptmap.indexOf(file['crypt-mode']);
});
return PBS.Utils.calculateCryptMode(crypt);
- }
+ },
},
{
name: 'matchesFilter',
type: 'boolean',
defaultValue: true,
},
- ]
+ ],
});
Ext.define('PBS.DataStoreContent', {
view.getStore().setSorters([
'backup-group',
'text',
- 'backup-time'
+ 'backup-time',
]);
Proxmox.Utils.monStoreErrors(view, this.store);
this.reload(); // initial load
this.store.setProxy({
type: 'proxmox',
timeout: 300*1000, // 5 minutes, we should make that api call faster
- url: url
+ url: url,
});
this.store.load();
expanded: false,
backup_type: item.data["backup-type"],
backup_id: item.data["backup-id"],
- children: []
+ children: [],
};
}
}
return false;
},
- after: () => {},
+ after: Ext.emptyFn,
});
for (const item of records) {
view.setRootNode({
expanded: true,
- children: children
+ children: children,
});
if (selected !== undefined) {
Proxmox.Utils.setErrorMask(view, false);
if (view.getStore().getFilters().length > 0) {
let searchBox = me.lookup("searchbox");
- let searchvalue = searchBox.getValue();;
+ let searchvalue = searchBox.getValue();
me.search(searchBox, searchvalue);
}
},
onPrune: function(view, rI, cI, item, e, rec) {
- var view = this.getView();
+ view = this.getView();
if (!(rec && rec.data)) return;
let data = rec.data;
onForget: function(view, rI, cI, item, e, rec) {
let me = this;
- var view = this.getView();
+ view = this.getView();
if (!(rec && rec.data)) return;
let data = rec.data;
let atag = document.createElement('a');
params['file-name'] = file;
atag.download = filename;
- let url = new URL(`/api2/json/admin/datastore/${view.datastore}/download-decoded`, window.location.origin);
+ let url = new URL(`/api2/json/admin/datastore/${view.datastore}/download-decoded`,
+ window.location.origin);
for (const [key, value] of Object.entries(params)) {
url.searchParams.append(key, value);
}
store.beginUpdate();
store.getRoot().cascadeBy({
before: function(item) {
- if(me.filter(item, value)) {
+ if (me.filter(item, value)) {
item.set('matchesFilter', true);
if (item.parentNode && item.parentNode.id !== 'root') {
item.parentNode.childmatches = true;
if (verify && verify.lastFailed) {
return 'proxmox-invalid-row';
}
+ return null;
},
},
xtype: 'treecolumn',
header: gettext("Backup Group"),
dataIndex: 'text',
- flex: 1
+ flex: 1,
},
{
header: gettext('Actions'),
data.filename &&
data.filename.endsWith('pxar.didx') &&
data['crypt-mode'] < 3);
- }
+ },
},
- ]
+ ],
},
{
xtype: 'datecolumn',
sortable: true,
dataIndex: 'backup-time',
format: 'Y-m-d H:i:s',
- width: 150
+ width: 150,
},
{
header: gettext("Size"),
if (iconCls) {
iconTxt = `<i class="fa fa-fw fa-${iconCls}"></i> `;
}
- return (iconTxt + PBS.Utils.cryptText[v]) || Proxmox.Utils.unknownText
- }
+ return (iconTxt + PBS.Utils.cryptText[v]) || Proxmox.Utils.unknownText;
+ },
},
{
header: gettext('Verify State'),
this.triggers.clear.setVisible(false);
this.setValue('');
},
- }
+ },
},
listeners: {
change: {
buffer: 500,
},
},
- }
+ },
],
});