mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-25 22:39:44 +00:00
node tasks: add duration column, hide by default
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
8e3f2973a8
commit
54dc3ab4de
@ -155,6 +155,23 @@ Ext.define('Proxmox.node.Tasks', {
|
|||||||
return Ext.Date.format(value, "M d H:i:s");
|
return Ext.Date.format(value, "M d H:i:s");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
header: gettext("Duration"),
|
||||||
|
hidden: true,
|
||||||
|
width: 80,
|
||||||
|
renderer: function(value, metaData, record) {
|
||||||
|
let start = record.data.starttime;
|
||||||
|
if (start) {
|
||||||
|
let end = record.data.endtime || Date.now();
|
||||||
|
let duration = end - start;
|
||||||
|
if (duration > 0) {
|
||||||
|
duration /= 1000;
|
||||||
|
}
|
||||||
|
return Proxmox.Utils.format_duration_human(duration);
|
||||||
|
}
|
||||||
|
return Proxmox.Utils.unknownText;
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
header: gettext("Node"),
|
header: gettext("Node"),
|
||||||
dataIndex: 'node',
|
dataIndex: 'node',
|
||||||
|
Loading…
Reference in New Issue
Block a user