[pve-devel] [PATCH manager] ui: prune: fix order of keep reasons

Fabian Ebner f.ebner at proxmox.com
Tue Sep 7 12:08:39 CEST 2021


This is the same as fix 40ff84b138bb7127ecc05a2f587cca4e7a917810 in
proxmox-backup. When returning a boolean instead of the expected
{negative, 0, positive}, the behavior is browser-dependent.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 www/manager6/window/Prune.js | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/www/manager6/window/Prune.js b/www/manager6/window/Prune.js
index f503773d..3056ab20 100644
--- a/www/manager6/window/Prune.js
+++ b/www/manager6/window/Prune.js
@@ -63,9 +63,7 @@ Ext.define('PVE.PruneInputPanel', {
 		];
 		let counter = {};
 
-		backups.sort(function(a, b) {
-		    return a.ctime < b.ctime;
-		});
+		backups.sort((a, b) => b.ctime - a.ctime);
 
 		let ruleIndex = -1;
 		let nextRule = function() {
-- 
2.30.2





More information about the pve-devel mailing list