ProxmoxProxy: add duration fields for proxmox-tasks
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
82327aca09
commit
66be1b8ac1
@ -43,6 +43,18 @@ Ext.define('Proxmox.RestProxy', {
|
||||
{ name: 'starttime', type: 'date', dateFormat: 'timestamp' },
|
||||
{ name: 'endtime', type: 'date', dateFormat: 'timestamp' },
|
||||
{ name: 'pid', type: 'int' },
|
||||
{
|
||||
name: 'duration',
|
||||
sortType: 'asInt',
|
||||
calculate: function(data) {
|
||||
let endtime = data.endtime;
|
||||
let starttime = data.starttime;
|
||||
if (endtime !== undefined) {
|
||||
return (endtime - starttime)/1000;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
'node', 'upid', 'user', 'status', 'type', 'id',
|
||||
],
|
||||
idProperty: 'upid',
|
||||
|
Loading…
x
Reference in New Issue
Block a user