Am 6/12/20 um 1:29 PM schrieb Dominik Csapak: > Signed-off-by: Dominik Csapak <d.csa...@proxmox.com> > --- > src/data/ProxmoxProxy.js | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/src/data/ProxmoxProxy.js b/src/data/ProxmoxProxy.js > index 53e92f3..40fdc08 100644 > --- a/src/data/ProxmoxProxy.js > +++ b/src/data/ProxmoxProxy.js > @@ -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).toFixed(0);
maybe do not drop sub second accuracy here already, that should happen in the renderer, at least one or even two decimal points would be nice. > + } > + return 0; > + }, > + }, > 'node', 'upid', 'user', 'status', 'type', 'id', > ], > idProperty: 'upid', > _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel