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 <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2025-04-05 17:19:54 +02:00
parent 5e778d983a
commit d1fd12d82d

View File

@ -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'];