[pve-devel] [PATCH manager 1/3] fix #4678: ui: don't sort storage backup content by vmid by default

Dominik Csapak d.csapak at proxmox.com
Thu Apr 20 10:06:14 CEST 2023


instead, add the vmid as extra column, so that the user can still sort
by vmid if they wish to

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/storage/BackupView.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/www/manager6/storage/BackupView.js b/www/manager6/storage/BackupView.js
index fbdf573d3..9ad1a4915 100644
--- a/www/manager6/storage/BackupView.js
+++ b/www/manager6/storage/BackupView.js
@@ -220,16 +220,20 @@ Ext.define('PVE.storage.BackupView', {
 		    },
 		},
 	    };
+	} else {
+	    me.extraColumns = {};
 	}
+	me.extraColumns.vmid = {
+	    header: gettext('VMID'),
+	    dataIndex: 'vmid',
+	    hidden: true,
+	    sorter: (a, b) => a.data.vmid - b.data.vmid,
+	};
 
 	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