From d1fd12d82dda12c9ed51b4540be04dee6ab93f6d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 5 Apr 2025 17:19:54 +0200 Subject: [PATCH] ui: datastore tuning options: render cut-off time as human readable For now just in the general datacenter option view, not when editing the tuning options. For also allowing one to enter this we should first provide our backend implementation as WASM to avoid having to redo this in JavaScript. Signed-off-by: Thomas Lamprecht --- www/Utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/Utils.js b/www/Utils.js index 1960abb3..9dcde694 100644 --- a/www/Utils.js +++ b/www/Utils.js @@ -855,8 +855,8 @@ Ext.define('PBS.Utils', { let gc_atime_cutoff = tuning['gc-atime-cutoff']; delete tuning['gc-atime-cutoff']; - gc_atime_cutoff = gc_atime_cutoff ?? '1445'; - options.push(`${gettext('GC Access-Time Cutoff')}: ${gc_atime_cutoff}m`); + let gc_atime_cutoff_rendered = Proxmox.Utils.format_duration_human((gc_atime_cutoff ?? 1445) * 60); + options.push(`${gettext('GC Access-Time Cutoff')}: ${gc_atime_cutoff_rendered}`); let gc_cache_capacity = tuning['gc-cache-capacity']; delete tuning['gc-cache-capacity'];