[pve-devel] [PATCH manager 1/2] backup views: sort backups by vmid, then descending by date
Fabian Ebner
f.ebner at proxmox.com
Tue Dec 7 14:08:43 CET 2021
to have the most recent ones first, while keeping backups from the
same guest together.
Suggested-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
www/manager6/grid/BackupView.js | 14 ++++++++++----
www/manager6/storage/BackupView.js | 12 ++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/www/manager6/grid/BackupView.js b/www/manager6/grid/BackupView.js
index ffa7d251..7f7e1b62 100644
--- a/www/manager6/grid/BackupView.js
+++ b/www/manager6/grid/BackupView.js
@@ -54,10 +54,16 @@ Ext.define('PVE.grid.BackupView', {
me.store = Ext.create('Ext.data.Store', {
model: 'pve-storage-content',
- sorters: {
- property: 'volid',
- order: 'DESC',
- },
+ sorters: [
+ {
+ property: 'vmid',
+ direction: 'ASC',
+ },
+ {
+ property: 'vdate',
+ direction: 'DESC',
+ },
+ ],
filters: [
vmtypeFilter,
searchFilter,
diff --git a/www/manager6/storage/BackupView.js b/www/manager6/storage/BackupView.js
index dca140fe..2328c0fc 100644
--- a/www/manager6/storage/BackupView.js
+++ b/www/manager6/storage/BackupView.js
@@ -207,5 +207,17 @@ Ext.define('PVE.storage.BackupView', {
}
me.callParent();
+
+ me.store.getSorters().clear();
+ me.store.setSorters([
+ {
+ property: 'vmid',
+ direction: 'ASC',
+ },
+ {
+ property: 'vdate',
+ direction: 'DESC',
+ },
+ ]);
},
});
--
2.30.2
More information about the pve-devel
mailing list