all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager 1/2] backup views: sort backups by vmid, then descending by date
@ 2021-12-07 13:08 Fabian Ebner
  2021-12-07 13:08 ` [pve-devel] [PATCH manager 2/2] sorters: use correct property 'direction' and keep default 'ASC' Fabian Ebner
  2021-12-15 15:03 ` [pve-devel] applied: [PATCH manager 1/2] backup views: sort backups by vmid, then descending by date Thomas Lamprecht
  0 siblings, 2 replies; 4+ messages in thread
From: Fabian Ebner @ 2021-12-07 13:08 UTC (permalink / raw)
  To: pve-devel

to have the most recent ones first, while keeping backups from the
same guest together.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-12-16  9:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 13:08 [pve-devel] [PATCH manager 1/2] backup views: sort backups by vmid, then descending by date Fabian Ebner
2021-12-07 13:08 ` [pve-devel] [PATCH manager 2/2] sorters: use correct property 'direction' and keep default 'ASC' Fabian Ebner
2021-12-16  9:14   ` [pve-devel] applied: " Dominik Csapak
2021-12-15 15:03 ` [pve-devel] applied: [PATCH manager 1/2] backup views: sort backups by vmid, then descending by date Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal